Depletion#
- class scarabee.DepletionReactionRates#
Holds the reaction rate data for a single nuclide, used in depletion calculations.
- __init__(self: scarabee._scarabee.DepletionReactionRates) None#
Initializes an empty set of reaction rates.
- property average_fission_energy#
Average energy, in eV, of a neutron inducing fission.
- property n_2n#
Energy integrated (n,2n) microscopic reaction rate in units of 1/s.
- property n_3n#
Energy integrated (n,3n) microscopic reaction rate in units of 1/s.
- property n_alpha#
Energy integrated (n,alpha) microscopic reaction rate in units of 1/s.
- property n_fission#
Energy integrated (n,fission) microscopic reaction rate in units of 1/s.
- property n_gamma#
Energy integrated (n,gamma) microscopic reaction rate in units of 1/s.
- property n_p#
Energy integrated (n,p) microscopic reaction rate in units of 1/s.
- property nuclide#
Name of the nuclide.
- property number_density#
Number of the specified nuclide in units of atoms per barn-cm.
- class scarabee.DepletionChain#
Represents a full depletion chain for use with a nuclear data library when performing depletion calculations. Holds data to account for radioactive decay and transmutation of nuclides.
- __init__(self: scarabee._scarabee.DepletionChain) None#
- descend_chains(self: scarabee._scarabee.DepletionChain, nuclides: collections.abc.Set[str], decay_only: bool = False) list[str]#
Finds the set of all possible nuclides given an initial set of nuclides.
- Parameters:
nuclides (set of string) – Set of initial nuclides.
decay_only (bool) – Only include target nuclides from radioactive decay. Default is False.
- Returns:
Sorted list of all possible nuclides given the initial set of nuclides.
- Return type:
list of string
- holds_nuclide_data(self: scarabee._scarabee.DepletionChain, nuclide: str) bool#
Returns True if a chain entry for the specified nuclide exists. If not, False is returned.
- Parameters:
nuclide (string) – Name of nuclide.
- Returns:
True if there is data for the nuclide. False otherwise.
- Return type:
bool
- insert_entry(self: scarabee._scarabee.DepletionChain, nuclide: str, entry: scarabee._scarabee.ChainEntry) None#
Inserts decay and transmutation data for a new nuclide.
- Parameters:
nuclide (string) – Name of nuclide.
entry (ChainEntry) – Decay and transmutation data for the nuclide.
- static load(fname: str) scarabee._scarabee.DepletionChain#
Loads a DepletionChain from a binary file.
- Parameters:
fname (string) – Name of the binary file.
- Returns:
Depletion chain from the file.
- Return type:
- nuclide_data(self: scarabee._scarabee.DepletionChain, nuclide: str) scarabee._scarabee.ChainEntry#
Returns the
ChainEntryfor the specified nuclide.- Parameters:
nuclide (string) – Name of nuclide.
- Returns:
Decay and transmutation data for the nuclide.
- Return type:
- property nuclides#
Set of all nuclides that have a chain entry.
- remove_nuclide(self: scarabee._scarabee.DepletionChain, nuclide: str) None#
Removes a nuclide from the chain. All targets referencing this nuclide are replaced with its radioactive decay targets.
- Parameters:
nuclide (string) – Name of nuclide to remove.
- save(self: scarabee._scarabee.DepletionChain, fname: str) None#
Saves the depletion chain to a binary file.
- Parameters:
fname (string) – Name of the output file.
- class scarabee.ChainEntry#
Represents all possible means by which a nuclide can be removed from a material. This includes radioactive decay and possible transmutations. For all possible loss paths, the possible resulting nuclide are also provided as different types of targets.
- __init__(self: scarabee._scarabee.ChainEntry) None#
- property decay_targets#
Targets for the radioactive decay of the nuclide.
- property half_life#
Half life of the nuclide in seconds.
- property n_2n#
Targets for the (n,2n) transmutation of the nuclide.
- property n_3n#
Targets for the (n,3n) transmutation of the nuclide.
- property n_alpha#
Targets for the (n,alpha) transmutation of the nuclide.
- property n_fission#
Energy dependent fission yields for the nuclide.
- property n_gamma#
Targets for the (n,gamma) transmutation of the nuclide.
- property n_p#
Targets for the (n,p) transmutation of the nuclide.
- class scarabee.NoTarget#
Represents the end of a decay / transmutation chain with no resulting nuclide.
- __init__(self: scarabee._scarabee.NoTarget) None#
- class scarabee.SingleTarget#
Represents a single possible resulting nuclide from a decay or transmutation.
- __init__(self: scarabee._scarabee.SingleTarget, target: str) None#
Creates a single nuclide depletion target.
- Parameters:
target (string) – Name of the target nuclide.
- property target#
Name of the target nuclide.
- class scarabee.Branch#
Represents a single branch (or target) when multiple nuclide targets are possible from a decay or nuclear reaction. This should not be used for fission yields ! Instead use
FissionYields.- __init__(self: scarabee._scarabee.Branch) None#
- property branch_ratio#
Branch ratio.
- property target#
Target nuclide.
- class scarabee.BranchingTargets#
Represents a set of possible targets for a sinble decay or reaction.
- __init__(self: scarabee._scarabee.BranchingTargets, branches: collections.abc.Sequence[scarabee._scarabee.Branch]) None#
Creates a BranchingTargets object.
- Parameters:
branches (list of
Branch) – Possible branches for the decay or transmutation.
- property branches#
List of all branches with the target name and branch ratio.
- class scarabee.FissionYields#
Represents a set of multiple targets with different yields (not probabilities) resulting from fission. The yields can be a function of the incident neutron energy.
- __init__(self: scarabee._scarabee.FissionYields, targets: collections.abc.Sequence[str], incident_energies: collections.abc.Sequence[SupportsFloat | SupportsIndex], yields: numpy.ndarray[numpy.float64]) None#
Constructs a tabulated set of fission yields.
- Parameters:
targets (list of string) – List of all possible targets.
incident_energies (list of float) – Sorted list of tabulated incident energies for which yields are provided.
yields (ndarray) – 2D Numpy array containing the fission yields where first axis is incident energy and second is target.
- fission_yield(self: scarabee._scarabee.FissionYields, t: SupportsInt | SupportsIndex, E: SupportsFloat | SupportsIndex) float#
Computes the fission yield for a specified target and incident neutron energy.
- Parameters:
t (int) – Index of the target nuclide.
E (float) – Incident energy of the neutron inducing fission.
- Returns:
Yield of the specified target at the specified incident energy.
- Return type:
float
- property incident_energies#
List of incident energies at which yields are tabulated.
- property size#
Number of targets.
- property targets#
List of possible target nuclides.
- class scarabee.DepletionMatrix#
Represents a depletion matrix containing transfer terms due to radioactive decay and transmutation reactions.
- __init__(self: scarabee._scarabee.DepletionMatrix, nuclides: collections.abc.Sequence[str]) None#
Initializes an empty depletion matrix for the provided nuclides.
- Parameters:
nuclides (list of string) – All possible nuclides in the material.
- compress(self: scarabee._scarabee.DepletionMatrix) None#
Puts the matrix into compressed format.
- exponential_product(self: scarabee._scarabee.DepletionMatrix, N: numpy.ndarray[numpy.float64], cram48: bool = False) None#
Computes the matrix product of the input vector N with the exponential of the depletion matrix. The array N is modified in place to contain the result of this product.
\[N' = \exp{A} N.\]This product is approximated using a Chebyshev Rational Approximation (CRAM). By default, a 16th order CRAM is used, but a 48th order approximation is available.
- Parameters:
N (ndarray) – 1D array of the number densities of the nuclides in the depletion matrix (in the same order). This array is modified in place, and will contain the result of the product after the function is complete.
cram48 (bool) – If True, a 48th order CRAM is used. If False, a 16th order CRAM is employed. Default value is False.
- get_nuclide_index(self: scarabee._scarabee.DepletionMatrix, nuclide: str) int#
Returns the index of the specified nuclide, if contained in the depletion matrix.
- Parameters:
nuclide (string) – Name of the nuclide.
- Returns:
Index of the nuclide.
- Return type:
int
- has_nuclide(self: scarabee._scarabee.DepletionMatrix, nuclide: str) bool#
Returns True if the depletion matrix contains the specified nuclide, and False otherwise.
- Parameters:
nuclide (string) – Name of the nuclide.
- Returns:
True if the nuclide is present, False otherwise.
- Return type:
bool
- property is_compressed#
True if the matrix is in compressed format, False otherwise.
- property nuclides#
List of nuclides considered in the depletion matrix.
- property size#
Number of nuclides in the depletion matrix.
- zero(self: scarabee._scarabee.DepletionMatrix) None#
Sets all entries in the depletion matrix to zero.
- scarabee.build_depletion_matrix(*args, **kwargs)#
Overloaded function.
build_depletion_matrix(chain: scarabee._scarabee.DepletionChain, mat: scarabee._scarabee.Material, flux: numpy.ndarray[numpy.float64], ndl: scarabee._scarabee.NDLibrary) -> scarabee._scarabee.DepletionMatrix
Builds a depletion matrix for a given material and flux spectrum.
- Parameters:
chain (DepletionChain) – Depletion chain to used when building the matrix.
mat (Material) – Material for which the chain is being built. Must have loaded depletion cross section data.
flux (ndarray) – 1D Numpy array containing the flux spectrum.
ndl (NDLibrary) – Nuclear data library, needed for the group structure when calculating the average fission energy.
- Returns:
Depletion matrix for the provided material and flux spectrum. The matrix has not been multiplied by any time step at this point.
- Return type:
build_depletion_matrix(chain: scarabee._scarabee.DepletionChain, nuc_rrs: collections.abc.Sequence[scarabee._scarabee.DepletionReactionRates]) -> scarabee._scarabee.DepletionMatrix
Builds a depletion matrix for a given set of reaction rates.
- Parameters:
chain (DepletionChain) – Depletion chain to used when building the matrix.
nuc_rrs (list of DepletionReactionRates) – Integrated reaction rates for all nuclides.
- Returns:
Depletion matrix for the provided reaction rates. The matrix has not been multiplied by any time step at this point.
- Return type: