Materials#
- class scarabee.CrossSection#
A CrossSection object contains all necessary cross section information to perform a transport calculation. A reduced set of arithmetic operations can be performed on CrossSections to facilitate the construction of macroscopic material cross sections. This includes scalar multiplication, and the addition of CrossSection objects.
- Dtr(self: scarabee._scarabee.CrossSection, g: SupportsInt) float#
Transport correction in group g.
- Parameters:
g (int) – Energy group.
- Ea(self: scarabee._scarabee.CrossSection, g: SupportsInt) float#
Absorption cross section in group g.
- Parameters:
g (int) – Energy group.
- Ef(self: scarabee._scarabee.CrossSection, g: SupportsInt) float#
Fission cross section in group g.
- Parameters:
g (int) – Energy group.
- Er(self: scarabee._scarabee.CrossSection, g: SupportsInt) float#
Removal cross section in group g.
- Parameters:
g (int) – Energy group.
- Es(*args, **kwargs)#
Overloaded function.
Es(self: scarabee._scarabee.CrossSection, l: typing.SupportsInt, g: typing.SupportsInt) -> float
Pl scattering cross section in group g.
- Parameters:
l (int) – Scattering moment.
g (int) – Energy group.
Es(self: scarabee._scarabee.CrossSection, l: typing.SupportsInt, gin: typing.SupportsInt, gout: typing.SupportsInt) -> float
Pl scattering cross section from group gin to gout.
- Parameters:
l (int) – Scattering moment.
gin (int) – Incoming energy group.
gout (int) – Outgoing energy group.
- Es_tr(*args, **kwargs)#
Overloaded function.
Es_tr(self: scarabee._scarabee.CrossSection, g: typing.SupportsInt) -> float
Transport corrected scattering cross section in group g.
- Parameters:
g (int) – Energy group.
Es_tr(self: scarabee._scarabee.CrossSection, gin: typing.SupportsInt, gout: typing.SupportsInt) -> float
Transport corrected scattering cross section from group gin to gout
- Parameters:
gin (int) – Incoming energy group.
gout (int) – Outgoing energy group.
- Et(self: scarabee._scarabee.CrossSection, g: SupportsInt) float#
Total cross section in group g.
- Parameters:
g (int) – Energy group.
- Etr(self: scarabee._scarabee.CrossSection, g: SupportsInt) float#
Transport corrected total cross section in group g.
- Parameters:
g (int) – Energy group.
- __init__(*args, **kwargs)#
Overloaded function.
__init__(self: scarabee._scarabee.CrossSection, Etr: numpy.ndarray[numpy.float64], Ea: numpy.ndarray[numpy.float64], Es_tr: numpy.ndarray[numpy.float64], Ef: numpy.ndarray[numpy.float64], vEf: numpy.ndarray[numpy.float64], chi: numpy.ndarray[numpy.float64], name: str = ‘’) -> None
Creates a CrossSection from transport corrected data.
- Parameters:
Etr (ndarray) – Transport corrected total cross section.
Ea (ndarray) – Absorption cross section.
Es_tr (ndarray) – Transport corrected scattering cross section matrix.
Ef (ndarray) – Fission cross section.
vEf (ndarray) – Fission yield time cross section.
chi (ndarray) – Fission spectrum.
name (str (optional)) – Name of material.
__init__(self: scarabee._scarabee.CrossSection, Etr: scarabee._scarabee.XS1D, Ea: scarabee._scarabee.XS1D, Es_tr: scarabee._scarabee.XS2D, Ef: scarabee._scarabee.XS1D, vEf: scarabee._scarabee.XS1D, chi: scarabee._scarabee.XS1D, name: str = ‘’) -> None
Creates a CrossSection from transport corrected data.
- Parameters:
Etr (XS1D) – Transport corrected total cross section.
Ea (XS1D) – Absorption cross section.
Es_tr (XS2D) – Transport corrected scattering cross section matrix.
Ef (XS1D) – Fission cross section.
vEf (XS1D) – Fission yield time cross section.
chi (XS1D) – Fission spectrum.
name (str (optional)) – Name of material.
__init__(self: scarabee._scarabee.CrossSection, Et: numpy.ndarray[numpy.float64], Dtr: numpy.ndarray[numpy.float64], Ea: numpy.ndarray[numpy.float64], Es: numpy.ndarray[numpy.float64], Ef: numpy.ndarray[numpy.float64], vEf: numpy.ndarray[numpy.float64], chi: numpy.ndarray[numpy.float64], name: str = ‘’) -> None
Creates a CrossSection object from uncorrected cross section data.
- Parameters:
Et (ndarray) – Total cross section
Dtr (ndarray) – Transport correction
Ea (ndarray) – Absorption cross section
Es (ndarray) – Scattering matrices for all legendre moments
Ef (ndarray) – Fission cross section
vEf (ndarray) – Fission yield time cross section
chi (ndarray) – Fission spectrum
name (str (optional)) – Name of material.
__init__(self: scarabee._scarabee.CrossSection, Et: scarabee._scarabee.XS1D, Dtr: scarabee._scarabee.XS1D, Ea: scarabee._scarabee.XS1D, Es: scarabee._scarabee.XS2D, Ef: scarabee._scarabee.XS1D, vEf: scarabee._scarabee.XS1D, chi: scarabee._scarabee.XS1D, name: str = ‘’) -> None
Creates a CrossSection object from uncorrected cross section data.
- Parameters:
Et (XS1D) – Total cross section
Dtr (XS1D) – Transport correction
Ea (XS1D) – Absorption cross section
Es (XS2D) – Scattering matrices for all legendre moments
Ef (XS1D) – Fission cross section
vEf (XS1D) – Fission yield time cross section
chi (XS1D) – Fission spectrum
name (str (optional)) – Name of material.
__init__(self: scarabee._scarabee.CrossSection, Etr: numpy.ndarray[numpy.float64], Ea: numpy.ndarray[numpy.float64], Es_tr: numpy.ndarray[numpy.float64], name: str = ‘’) -> None
Creates a CrossSection from transport corrected data. Fission cross sections and spectrum initialized to zero.
- Parameters:
Etr (ndarray) – Transport corrected total cross section.
Ea (ndarray) – Absorption cross section.
Es_tr (ndarray) – Transport corrected scattering cross section matrix.
name (str (optional)) – Name of material.
__init__(self: scarabee._scarabee.CrossSection, Etr: scarabee._scarabee.XS1D, Ea: scarabee._scarabee.XS1D, Es_tr: scarabee._scarabee.XS2D, name: str = ‘’) -> None
Creates a CrossSection from transport corrected data. Fission cross sections and spectrum initialized to zero.
- Parameters:
Etr (XS1D) – Transport corrected total cross section.
Ea (XS1D) – Absorption cross section.
Es_tr (XS2D) – Transport corrected scattering cross section matrix.
name (str (optional)) – Name of material.
__init__(self: scarabee._scarabee.CrossSection, Et: numpy.ndarray[numpy.float64], Dtr: numpy.ndarray[numpy.float64], Ea: numpy.ndarray[numpy.float64], Es: numpy.ndarray[numpy.float64], name: str = ‘’) -> None
Creates a CrossSection object from uncorrected cross section data. Fission cross sections and spectrum initialized to zero.
- Parameters:
Et (ndarray) – Total cross section.
Dtr (ndarray) – Transport correction
Ea (ndarray) – Absorption cross section.
Es (ndarray) – Scattering matrices for all legendre moments
name (str (optional)) – Name of material.
__init__(self: scarabee._scarabee.CrossSection, Et: scarabee._scarabee.XS1D, Dtr: scarabee._scarabee.XS1D, Ea: scarabee._scarabee.XS1D, Es: scarabee._scarabee.XS2D, name: str = ‘’) -> None
Creates a CrossSection object from uncorrected cross section data. Fission cross sections and spectrum initialized to zero.
- Parameters:
Et (XS1D) – Total cross section.
Dtr (XS1D) – Transport correction
Ea (XS1D) – Absorption cross section.
Es (XS2D) – Scattering matrices for all legendre moments
name (str (optional)) – Name of material.
- property anisotropic#
True if the material has a P1 scattering matrix.
- chi(self: scarabee._scarabee.CrossSection, g: SupportsInt) float#
Fission spectrum in group g.
- Parameters:
g (int) – Energy group.
- condense(self: scarabee._scarabee.CrossSection, groups: collections.abc.Sequence[tuple[SupportsInt, SupportsInt]], flux: numpy.ndarray[numpy.float64]) scarabee._scarabee.CrossSection#
Condenses the cross sections to a new energy group structure. The condensation group structure is provided as a list of pairs (2D tuples), indicating the lower and upper group indices (inclusive) of a macro energy group.
- Parameters:
groups (list of 2D tuples of ints.) – The scheme for condensing energy groups.
flux (ndarray of floats.) – The weighting flux spectrum of the original group structure.
- Returns:
Condensed set of cross sections.
- Return type:
- diffusion_xs(self: scarabee._scarabee.CrossSection) scarabee::DiffusionCrossSection#
Creates a
DiffusionCrossSectionfrom the cross section.- Returns:
Diffusion cross sections.
- Return type:
- property fissile#
True if material is fissile.
- static load(fname: str) scarabee._scarabee.CrossSection#
Loads cross section data from a binary file.
- Parameters:
fname (str) – Name of file from which to load data.
- Returns:
Cross sections from the file.
- Return type:
- property max_legendre_order#
Maximum legendre order for scattering.
- property name#
Name of material.
- property ngroups#
Number of energy groups.
- nu(self: scarabee._scarabee.CrossSection, g: SupportsInt) float#
Fission yield in group g.
- Parameters:
g (int) – Energy group.
- save(self: scarabee._scarabee.CrossSection, fname: str) None#
Saves the cross section data to a binary file.
- Parameters:
fname (str) – Name of file in which to save data.
- set(self: scarabee._scarabee.CrossSection, arg0: scarabee._scarabee.CrossSection) None#
Reinitializes to be copy of another cross section.
- Parameters:
other (CrossSection) – Cross section used to reinitialize the current data.
- vEf(self: scarabee._scarabee.CrossSection, g: SupportsInt) float#
Fission yield * cross section in group g.
- Parameters:
g (int) – Energy group.
- class scarabee.DiffusionCrossSection#
A DiffusionCrossSection object contains all necessary cross section information to perform a diffusion calculation.
- D(self: scarabee._scarabee.DiffusionCrossSection, g: SupportsInt) float#
Diffusion coefficient in group g.
- Parameters:
g (int) – Energy group.
- Ea(self: scarabee._scarabee.DiffusionCrossSection, g: SupportsInt) float#
Absorption cross section in group g.
- Parameters:
g (int) – Energy group.
- Ef(self: scarabee._scarabee.DiffusionCrossSection, g: SupportsInt) float#
Fission cross section in group g.
- Parameters:
g (int) – Energy group.
- Er(self: scarabee._scarabee.DiffusionCrossSection, g: SupportsInt) float#
Removal cross section in group g.
- Parameters:
g (int) – Energy group.
- Es(*args, **kwargs)#
Overloaded function.
Es(self: scarabee._scarabee.DiffusionCrossSection, g: typing.SupportsInt) -> float
Transport corrected scattering cross section in group g.
- Parameters:
g (int) – Energy group.
Es(self: scarabee._scarabee.DiffusionCrossSection, gin: typing.SupportsInt, gout: typing.SupportsInt) -> float
Transport corrected scattering cross section from group gin to gout
- Parameters:
gin (int) – Incoming energy group.
gout (int) – Outgoing energy group.
- __init__(*args, **kwargs)#
Overloaded function.
__init__(self: scarabee._scarabee.DiffusionCrossSection, D: numpy.ndarray[numpy.float64], Ea: numpy.ndarray[numpy.float64], Es: numpy.ndarray[numpy.float64], Ef: numpy.ndarray[numpy.float64], vEf: numpy.ndarray[numpy.float64], chi: numpy.ndarray[numpy.float64], name: str = ‘’) -> None
Creates a DiffusionCrossSection from transport corrected data.
- Parameters:
D (ndarray) – Diffusion coefficients.
Ea (ndarray) – Absorption cross section.
Es (ndarray) – Transport corrected scattering cross section matrix.
Ef (ndarray) – Fission cross section.
vEf (ndarray) – Fission yield time cross section.
chi (ndarray) – Fission spectrum.
name (str (optional)) – Name of material.
__init__(self: scarabee._scarabee.DiffusionCrossSection, D: numpy.ndarray[numpy.float64], Ea: numpy.ndarray[numpy.float64], Es: numpy.ndarray[numpy.float64], name: str = ‘’) -> None
Creates a DiffusionCrossSection from transport corrected data. Fission cross sections and spectrum initialized to zero.
- Parameters:
D (ndarray) – Diffusion coefficients.
Ea (ndarray) – Absorption cross section.
Es (ndarray) – Transport corrected scattering cross section matrix.
name (str (optional)) – Name of material.
- chi(self: scarabee._scarabee.DiffusionCrossSection, g: SupportsInt) float#
Fission spectrum in group g.
- Parameters:
g (int) – Energy group.
- condense(self: scarabee._scarabee.DiffusionCrossSection, groups: collections.abc.Sequence[tuple[SupportsInt, SupportsInt]], flux: numpy.ndarray[numpy.float64]) scarabee._scarabee.DiffusionCrossSection#
Condenses the cross sections to a new energy group structure. The condensation group structure is provided as a list of pairs (2D tuples), indicating the lower and upper group indices (inclusive) of a macro energy group.
- Parameters:
groups (list of 2D tuples of ints.) – The scheme for condensing energy groups.
flux (ndarray of floats.) – The weighting flux spectrum of the original group structure.
- Returns:
Condensed set of diffusion cross sections.
- Return type:
DiffusionsCrossSection
- property fissile#
True if material is fissile.
- static load(fname: str) scarabee._scarabee.DiffusionCrossSection#
Loads a set of diffusion cross sections from a binary file.
- Parameters:
fname (str) – Name of file from which to load data.
- Returns:
Diffusion cross sections from the file.
- Return type:
- property name#
Name of material.
- property ngroups#
Number of energy groups.
- nu(self: scarabee._scarabee.DiffusionCrossSection, g: SupportsInt) float#
Fission yield in group g.
- Parameters:
g (int) – Energy group.
- save(self: scarabee._scarabee.DiffusionCrossSection, fname: str) None#
Saves a set of diffusion cross sections to a binary file.
- Parameters:
fname (str) – Name of file in which to save data.
- vEf(self: scarabee._scarabee.DiffusionCrossSection, g: SupportsInt) float#
Fission yield * cross section in group g.
- Parameters:
g (int) – Energy group.
- class scarabee.ADF#
Members:
XN : Assembly x < 0 side.
XP : Assembly x > 0 side.
YN : Assembly y < 0 side.
YP : Assembly y > 0 side.
ZN : Assembly z < 0 side.
ZP : Assembly z > 0 side.
- __init__(self: scarabee._scarabee.ADF, value: SupportsInt) None#
- property name#
- class scarabee.CDF#
Members:
I : Corner of assembly in quadrant I.
II : Corner of assembly in quadrant II.
III : Corner of assembly in quadrant III.
IV : Corner of assembly in quadrant IV.
- __init__(self: scarabee._scarabee.CDF, value: SupportsInt) None#
- property name#
- class scarabee.DiffusionData#
A DiffusionData object contains all necessary cross section information to perform a diffusion calculation, along with assembly discontinuity factors and form factors.
- D(self: scarabee._scarabee.DiffusionData, g: SupportsInt) float#
Diffusion coefficient in group g.
- Parameters:
g (int) – Energy group.
- Ea(self: scarabee._scarabee.DiffusionData, g: SupportsInt) float#
Absorption cross section in group g.
- Parameters:
g (int) – Energy group.
- Ef(self: scarabee._scarabee.DiffusionData, g: SupportsInt) float#
Fission cross section in group g.
- Parameters:
g (int) – Energy group.
- Er(self: scarabee._scarabee.DiffusionData, g: SupportsInt) float#
Removal cross section in group g.
- Parameters:
g (int) – Energy group.
- Es(*args, **kwargs)#
Overloaded function.
Es(self: scarabee._scarabee.DiffusionData, g: typing.SupportsInt) -> float
Transport corrected scattering cross section in group g.
- Parameters:
g (int) – Energy group.
Es(self: scarabee._scarabee.DiffusionData, gin: typing.SupportsInt, gout: typing.SupportsInt) -> float
Transport corrected scattering cross section from group gin to gout
- Parameters:
gin (int) – Incoming energy group.
gout (int) – Outgoing energy group.
- __init__(*args, **kwargs)#
Overloaded function.
__init__(self: scarabee._scarabee.DiffusionData, xs: scarabee._scarabee.DiffusionCrossSection) -> None
Creates a DiffusionData object.
- Parameters:
xs (DiffusionCrossSection) – Diffusion cross sections for calculations.
__init__(self: scarabee._scarabee.DiffusionData, xs: scarabee._scarabee.DiffusionCrossSection, form_factors: numpy.ndarray[numpy.float64]) -> None
Creates a DiffusionData object.
- Parameters:
xs (DiffusionCrossSection) – Diffusion cross sections for calculations.
form_factors (ndarray) – A 2D array of pin-wise form factors for power reconstruction. The first axis is y (from positive to negative) and the second axis is x (from negative to positive).
__init__(self: scarabee._scarabee.DiffusionData, xs: scarabee._scarabee.DiffusionCrossSection, form_factors: numpy.ndarray[numpy.float64], adf: numpy.ndarray[numpy.float64], cdf: numpy.ndarray[numpy.float64]) -> None
Creates a DiffusionData object.
- Parameters:
xs (DiffusionCrossSection) – Diffusion cross sections for calculations.
form_factors (ndarray) – A 2D array of pin-wise form factors for power reconstruction. The first axis is y (from positive to negative) and the second axis is x (from negative to positive).
adf (ndarray) – A 2D array of ADFs. The first axis is energy group, and the second axis is the side (Y+, X+, Y-, X-).
cdf (ndarray) – A 2D array of CDFs. The first axis is energy group, and the second axis is the corner (I, II, III, IV).
- property adf#
Assembly discontinuity factors.
- adf_xn(self: scarabee._scarabee.DiffusionData, g: SupportsInt) float#
The ADS for the x- surface in group g.
- Parameters:
g (int) – Energy group.
- adf_xp(self: scarabee._scarabee.DiffusionData, g: SupportsInt) float#
The ADS for the x+ surface in group g.
- Parameters:
g (int) – Energy group.
- adf_yn(self: scarabee._scarabee.DiffusionData, g: SupportsInt) float#
The ADS for the y- surface in group g.
- Parameters:
g (int) – Energy group.
- adf_yp(self: scarabee._scarabee.DiffusionData, g: SupportsInt) float#
The ADS for the y+ surface in group g.
- Parameters:
g (int) – Energy group.
- adf_zn(self: scarabee._scarabee.DiffusionData, g: SupportsInt) float#
The ADS for the z- surface in group g.
- Parameters:
g (int) – Energy group.
- adf_zp(self: scarabee._scarabee.DiffusionData, g: SupportsInt) float#
The ADS for the z+ surface in group g.
- Parameters:
g (int) – Energy group.
- property cdf#
Corner discontinuity factors.
- cdf_I(self: scarabee._scarabee.DiffusionData, g: SupportsInt) float#
The CDF for the quadrant I corner in group g.
- Parameters:
g (int) – Energy group.
- cdf_II(self: scarabee._scarabee.DiffusionData, g: SupportsInt) float#
The CDF for the quadrant II corner in group g.
- Parameters:
g (int) – Energy group.
- cdf_III(self: scarabee._scarabee.DiffusionData, g: SupportsInt) float#
The CDF for the quadrant III corner in group g.
- Parameters:
g (int) – Energy group.
- cdf_IV(self: scarabee._scarabee.DiffusionData, g: SupportsInt) float#
The CDF for the quadrant IV corner in group g.
- Parameters:
g (int) – Energy group.
- chi(self: scarabee._scarabee.DiffusionData, g: SupportsInt) float#
Fission spectrum in group g.
- Parameters:
g (int) – Energy group.
- property fissile#
True if material is fissile.
- property form_factors#
Assembly form-factors for power reconstruction.
- static load(fname: str) scarabee._scarabee.DiffusionData#
Loads diffusion data from a binary file.
- Parameters:
fname (str) – Name of file from which to load data.
- Returns:
Diffusion cross sections, form factors, and ADF from the file.
- Return type:
- property name#
Name of material.
- property ngroups#
Number of energy groups.
- nu(self: scarabee._scarabee.DiffusionData, g: SupportsInt) float#
Fission yield in group g.
- Parameters:
g (int) – Energy group.
- rotate_clockwise(self: scarabee._scarabee.DiffusionData) None#
Rotates the ADFs and form factors corresponding to a 90 degree rotation of the assembly in the clockwise direction.
- rotate_counterclockwise(self: scarabee._scarabee.DiffusionData) None#
Rotates the ADFs and form factors corresponding to a 90 degree rotation of the assembly in the counter clockwise direction.
- save(self: scarabee._scarabee.DiffusionData, fname: str) None#
Saves the diffuion data to a binary file.
- Parameters:
fname (str) – Name of file in which to save data.
- vEf(self: scarabee._scarabee.DiffusionData, g: SupportsInt) float#
Fission yield * cross section in group g.
- Parameters:
g (int) – Energy group.
- property xs#
The contained DiffusionCrossSection object.
- property xs_name#
Name of the DiffusionCrossSection.
- class scarabee.NuclideHandle#
A NuclideHandle contains information about a specific nuclide, obtained from the nuclear data library (see
NDLibrary).- property ZA#
The ZA number of the nuclide, constructed as Z*1000 + A.
- __init__(*args, **kwargs)#
- property awr#
Atomic weight ratio of the nuclide.
- property dilutions#
List of dilutions at which cross sections are tabulated.
- property fissile#
True if the nuclide is fissile, False otherwise.
- property fission_energy#
Average energy release per fission of the nuclide, in MeV.
- property ir_lambda#
List of intermediate resonance parameters for the nuclide.
- property label#
Optional label provided at library creation.
- property name#
Indentifier of the nuclide.
- property potential_xs#
Potential scattering cross section of the nuclide.
- property resonant#
True if the nuclide is resonant, False otherwise.
- property temperatures#
List of temperatures at which cross sections are tabulated.
- class scarabee.NDLibrary#
- __init__(*args, **kwargs)#
Overloaded function.
__init__(self: scarabee._scarabee.NDLibrary) -> None
Creates a new NDLibrary object from the HDF5 file pointed to by the environemnt variable SCARABEE_ND_LIBRARY.
__init__(self: scarabee._scarabee.NDLibrary, fname: str) -> None
Creates a new NDLibrary object from an HDF5 file.
- Parameters:
fname (str) – Name of the hdf5 file with the library.
- property cmfd_condensation_scheme#
The CMFD condensation scheme for acceleration in the MOC calculation (if provided).
- property condensation_scheme#
The condensation scheme to obtain the default few-group structure from the library group structure (if provided).
- property depletion_chain#
The DepletionChain intended for use with the library.
- dilution_xs(self: scarabee._scarabee.NDLibrary, name: str, g: SupportsInt, temp: SupportsFloat, dil: SupportsFloat, max_l: SupportsInt = 1) scarabee._scarabee.ResonantOneGroupXS#
Interpolates the cross section of the prescribed nuclide at the prescribed energy group to the desired temperature and dilution. If the nuclide is not resonant or the desired group g is not resonant, an exception is raised.
- Parameters:
name (str) – Name of the desired nuclide.
g (int) – Energy group index.
temp (float) – Desired temperature in kelvin.
dil (str) – Desired dilution in barns.
max_l (int) – Maximum legendre moment (default is 1).
- Returns:
Interpolated cross sections in group g.
- Return type:
- property first_resonant_group#
Index of the first resonant group in the library.
- get_nuclide(self: scarabee._scarabee.NDLibrary, name: str) scarabee._scarabee.NuclideHandle#
Returns the
NuclideHandleof the the desired nuclide.- Parameters:
name (str) – Name of the desired nuclide.
- property group_bounds#
The boundaries of the energy groups for the group structure (in decreasing order).
- property group_structure#
The name of the group structure (if provided).
- infinite_dilution_xs(self: scarabee._scarabee.NDLibrary, arg0: str, arg1: SupportsFloat, arg2: SupportsInt) tuple[scarabee._scarabee.MicroNuclideXS, scarabee._scarabee.MicroDepletionXS]#
Calculates the infinite dilution cross sections for the nuclide at the desired temperatures.
- Parameters:
name (str) – Name of the desired nuclide.
temp (float) – Desired temperature in kelvin.
max_l (int) – Maximum legendre moment (default is 1).
- Returns:
Interpolated infinite dilution cross sections at desired temperature.
- Return type:
- property last_resonant_group#
Index of the last resonant group in the library.
- property library#
Name of the nuclear data library (if provided).
- property ngroups#
Number of energy groups in the library.
- ring_two_term_xs(self: scarabee._scarabee.NDLibrary, name: str, g: SupportsInt, temp: SupportsFloat, a1: SupportsFloat, a2: SupportsFloat, b1: SupportsFloat, b2: SupportsFloat, mat_pot_xs: SupportsFloat, N: SupportsFloat, Rfuel: SupportsFloat, Rin: SupportsFloat, Rout: SupportsFloat, max_l: SupportsInt = 1) scarabee._scarabee.ResonantOneGroupXS#
Uses the two-term rational approximation and the Stoker-Weiss method to produce the self-shielded cross sections for a single nuclide in a ring of fuel. If the nuclide is not resonant or the desired group g is not resonant, an exception is raised.
- Parameters:
name (str) – Name of the nuclide to be treated.
g (int) – Energy group index.
temp (float) – Temperature of the material (in kelvin).
a1 (float) – \(\alpha_1\).
a2 (float) – \(\alpha_2\).
b1 (float) – \(\beta_1\).
b2 (float) – \(\beta_2\).
mat_pot_xs (float) – Macroscopic potential cross section of material.
N (float) – Number density of the nuclie being shielded.
Rfuel (float) – Radius of the fuel pellet.
Rin (float) – Inner radius of the fuel ring.
Rout (float) – Outer radius of the fuel ring.
max_l (int) – Maximum legendre moment (default is 1).
- Returns:
Interpolated cross sections in group g.
- Return type:
- two_term_xs(self: scarabee._scarabee.NDLibrary, name: str, g: SupportsInt, temp: SupportsFloat, b1: SupportsFloat, b2: SupportsFloat, xs1: SupportsFloat, xs2: SupportsFloat, max_l: SupportsInt = 1) scarabee._scarabee.ResonantOneGroupXS#
Uses the two-term rational approximation for self shielding of cross sections, where the fuel escape probability is approximated as
\[P^{F\to M}(E) = \beta_1\frac{\alpha_1 \Sigma_e}{\Sigma_t(E) + \alpha_1\Sigma_e} + \beta_2\frac{\alpha_2 \Sigma_e}{\Sigma_t(E) + \alpha_2\Sigma_e}.\]If shielding isotope \(r\) with potential cross section \(\sigma_p^r\) and number density \(N_r\), then the background cross sections are computed as
\[\begin{split}\sigma_1 = \frac{\lambda\Sigma_p - \lambda_rN_r\sigma_p^r + \alpha_1\Sigma_e}{N_r} \\\\ \sigma_2 = \frac{\lambda\Sigma_p - \lambda_rN_r\sigma_p^r + \alpha_2\Sigma_e}{N_r}\end{split}\]where \(\Sigma_p\) is the macroscopic potential scattering cross section of the material, \(\lambda_r\) is the intermediate resonance parameter for isotope \(r\), and \(\Sigma_e\) is the escape cross section. If the nuclide is not resonant or the desired group g is not resonant, an exception is raised.
- Parameters:
name (str) – Name of the nuclide to be treated.
g (int) – Energy group index.
temp (float) – Temperature of the material (in kelvin).
b1 (float) – \(\beta_1\).
b2 (float) – \(\beta_2\).
xs1 (float) – Background cross section for first term (\(\sigma_1\)).
xs2 (float) – Background cross section for second term (\(\sigma_2\)).
max_l (int) – Maximum legendre moment (default is 1).
- Returns:
Interpolated cross sections in group g.
- Return type:
- unload(self: scarabee._scarabee.NDLibrary) None#
Deallocates all NuclideHandles which contained raw nuclear data.
- class scarabee.MicroDepletionXS#
Holds the microscopic cross sections needed for depletion calculations.
- __init__(*args, **kwargs)#
- property n_2n#
(n,2n) cross section.
- property n_3n#
(n,3n) cross section.
- property n_alpha#
(n,alpha) cross section.
- property n_fission#
Fission cross section.
- property n_gamma#
Capture cross section.
- property n_p#
(n,p) cross section.
- class scarabee.MicroNuclideXS#
Holds the microscopic cross sections for a nuclide.
- property Dtr#
Transport correction.
- property Ea#
Absorption cross section.
- property Ef#
Fission cross section.
- property Es#
Scattering cross section.
- property Et#
Total cross section.
- __init__(*args, **kwargs)#
- property chi#
Fission spectrum.
- property nu#
Fission yield.
- class scarabee.ResonantOneGroupXS#
Single group resonant cross sections.
- property Dtr#
Transport correction.
- property Ea#
Absorption cross section.
- property Ef#
Fission cross section.
- property Es#
Scattering cross section.
- __init__(*args, **kwargs)#
- property gout_min#
First outgoing energy group.
- property n_gamma#
Capture cross section.
- class scarabee.DepletionReactionRates#
Holds the reaction rate data for a single nuclide, used in depletion calculations.
- __init__(*args, **kwargs)#
- 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.Nuclide#
A Nuclide represents a nuclide name - fraction pair, which acts as a component of a
MaterialComposition.- __init__(self: scarabee._scarabee.Nuclide) None#
Creates a Nuclide with no name, and a fraction of zero.
- property fraction#
Fraction of the material (by atoms or weight) that is occupied by this nuclide.
- property name#
Name of the nuclide (i.e. “U235”, “H1_H2O”, etc.).
- class scarabee.Fraction#
Members:
Atoms : Indicates fractions are in Atoms.
Weight : Indicates fractions are in Weight.
- __init__(self: scarabee._scarabee.Fraction, value: SupportsInt) None#
- property name#
- class scarabee.MaterialComposition#
A MaterialComposition object represents all nuclides which make up a material, and portion of the material taken up b y each nuclide.
- __init__(self: scarabee._scarabee.MaterialComposition, fractions: scarabee._scarabee.Fraction = <Fraction.Atoms: 0>, name: str = '') None#
Creates an empty composition, with no nuclides.
- Parameters:
fractions (Fraction) – Indicates if material is specified using atom or weight fractions. Default value is Fraction.Atom.
name (str) – Name for the material (default value is “”).
- add_element(self: scarabee._scarabee.MaterialComposition, name: str, fraction: SupportsFloat) None#
Adds all naturally occurring isotopes of an element to the material.
- Parameters:
name (str) – Name of the element.
fraction (float) – Fraction that the element occupies in the material.
- add_leu(self: scarabee._scarabee.MaterialComposition, enrichment: SupportsFloat, fraction: SupportsFloat) None#
Adds all naturally occurring isotopes of Uranium to the material for a given weight percent enrichment. Method is only valid for enrichments <= 5 w/o. More information can be found in ORNL/CSD/TM-244.
- Parameters:
enrichment (float) – Weight enrichment of U235.
fraction (float) – Fraction that the Uranium occupies in the material.
- add_nuclide(*args, **kwargs)#
Overloaded function.
add_nuclide(self: scarabee._scarabee.MaterialComposition, name: str, fraction: typing.SupportsFloat) -> None
Adds a new nuclide to the material.
- Parameters:
name (str) – Name of the nuclide.
fraction (float) – Fraction that the nuclide occupies in the material.
add_nuclide(self: scarabee._scarabee.MaterialComposition, nuc: scarabee._scarabee.Nuclide) -> None
Adds a new nuclide to the material.
- property fractions#
Flag indicating if the nuclide fractions are in Atoms or Weight.
- property name#
String with the name of the material.
- class scarabee.DensityUnits#
Members:
g_cm3 : Grams per cubic-centimeter.
a_bcm : Atoms per barn-centimeter.
sum : Compute density from sum of fractions.
- __init__(self: scarabee._scarabee.DensityUnits, value: SupportsInt) None#
- property name#
- class scarabee.Material#
A Material object represents a material composition in combination with a density and temperature. From a Material, it is possible to obtain macroscopic potential cross sections, and construct self-shielded macroscopic cross sections.
- __init__(*args, **kwargs)#
Overloaded function.
__init__(self: scarabee._scarabee.Material, comp: scarabee._scarabee.MaterialComposition, temp: typing.SupportsFloat, ndl: scarabee._scarabee.NDLibrary) -> None
Creates a new Material definition with specified temperature. The density is determined by computing the sum of fractions in the
MaterialCompositon. If the fractions are atoms, then the density units are interpreted as atoms per barn-centimeter. If the fractions are weight, then the density units are interpreted as grams per cubic-centimeter.- Parameters:
comp (MaterialComposition) – Composition defining the material.
temp (float) – Temperature of the material in kelvin.
ndl (NDLibrary) – Nuclear data library.
__init__(self: scarabee._scarabee.Material, comp: scarabee._scarabee.MaterialComposition, temp: typing.SupportsFloat, density: typing.SupportsFloat, du: scarabee._scarabee.DensityUnits, ndl: scarabee._scarabee.NDLibrary) -> None
Creates a new Material definition with specified temperature and density. If the density units are sum, then the provided value of the density is ignored, and instead computed from the composition fractions.
- Parameters:
comp (MaterialComposition) – Composition defining the material.
temp (float) – Temperature of the material in kelvin.
density (float) – Density of the material in units given by du.
du (DensityUnits) – Units of the provided density (if sum, density is ignored).
ndl (NDLibrary) – Nuclear data library.
- atom_density(self: scarabee._scarabee.Material, name: str) float#
Number of atoms per barn-centimeter of the indicated nuclide.
- Parameters:
name (str) – Name of the desired nuclide.
- Returns:
Number of atoms per barn-centimeter of desired nuclide.
- Return type:
float
- property atoms_per_bcm#
Total number of atoms per barn-centimeter in the material.
- property average_molar_mass#
Average molar of an atom in the material, based on all nuclides in the material.
- carlvik_xs(self: scarabee._scarabee.Material, C: SupportsFloat, Ee: SupportsFloat, ndl: scarabee._scarabee.NDLibrary, max_l: SupportsInt | None = 1) scarabee._scarabee.CrossSection#
Computes the macroscopic material cross section, self-shielded according to the Carlvik two-term approximation.
- Parameters:
C (float) – Dancoff correction factor.
Ee (float) – Escpae cross section.
ndl (NDLibrary) – Nuclear data library for cross section interpolation.
max_l (optional int) – Maximum legendre moment. If not provided, the max_legendre_order attribute is used. Default is None.
- Returns:
The macroscopic self-shielded cross section.
- Return type:
- clear_all_micro_xs_data(self: scarabee._scarabee.Material) None#
Clears all of the previously computed microscopic cross section data.
- clear_depletion_micro_xs_data(self: scarabee._scarabee.Material) None#
Clears the previously computed microscopic cross section data required for depletion calculations.
- clear_transport_micro_xs_data(self: scarabee._scarabee.Material) None#
Clears the previously computed microscopic cross section data required for transport calculations.
- property composition#
The
MaterialCompositiondefining the nuclides in the material.
- compute_depletion_reaction_rates(self: scarabee._scarabee.Material, flux: numpy.ndarray[numpy.float64], ndl: scarabee._scarabee.NDLibrary) list[scarabee._scarabee.DepletionReactionRates]#
Computes the various depletion reaction rates for each nuclide, based on the provided flux spectrum.
- Parameters:
flux (ndarray) – 1D array with the flux spectrum.
ndl (NDLibrary) – Nuclear data library for fission energy release.
- Returns:
Computed fission power density.
- Return type:
List of DepletionReactionRates
- compute_fission_power_density(self: scarabee._scarabee.Material, flux: numpy.ndarray[numpy.float64], ndl: scarabee._scarabee.NDLibrary) float#
Computes the fission power density in units of MeV/cm3/s, based on the provided flux spectrum.
- Parameters:
flux (ndarray) – 1D array with the flux spectrum.
ndl (NDLibrary) – Nuclear data library for fission energy release.
- Returns:
Computed fission power density.
- Return type:
float
- dilution_xs(self: scarabee._scarabee.Material, dils: collections.abc.Sequence[SupportsFloat], ndl: scarabee._scarabee.NDLibrary, max_l: SupportsInt | None = 1) scarabee._scarabee.CrossSection#
Computes the macroscopic material cross section with nuclides interpolated to the provided dilutions.
- Parameters:
dils (list of float) – Desired dilution for each nuclide.
ndl (NDLibrary) – Nuclear data library for cross section interpolation.
max_l (optional int) – Maximum legendre moment. If not provided, the max_legendre_order attribute is used. Default is None.
- Returns:
The macroscopic cross section.
- Return type:
- property fissile#
True if the material is fissile, False otherwise.
- property fissionable_grams_per_cm3#
Density of fissionable matter in the material in grams per cubic-centimeter.
- property grams_per_cm3#
Density of the material in grams per cubic-centimeter.
- has_component(self: scarabee._scarabee.Material, name: str) bool#
Indicates if a nuclide is present in the material.
- Parameters:
name (str) – Name of the desired nuclide.
- Returns:
True if nuclide is present, False if not.
- Return type:
bool
- property has_depletion_micro_xs_data#
True if microscopic cross sections for depletion calculations are present, False otherwise. Should be True after calling a method which returns a CrossSection object, unless data has been cleared.
- property has_transport_micro_xs_data#
True if microscopic cross sections for transport calculations are present, False otherwise. Should be True after calling a method which returns a CrossSection object, unless data has been cleared.
- property max_legendre_order#
The maximum legendre order for loading and interpolating scattering matrices. The default value is 1.
- property name#
String with the name of the Material.
- property potential_xs#
Macroscopic potential scattering cross section in units of 1/cm.
- property resonant#
True if the material is resonant, False otherwise.
- ring_carlvik_xs(self: scarabee._scarabee.Material, C: SupportsFloat, Rfuel: SupportsFloat, Rin: SupportsFloat, Rout: SupportsFloat, ndl: scarabee._scarabee.NDLibrary, max_l: SupportsInt | None = 1) scarabee._scarabee.CrossSection#
Computes the macroscopic material cross section, self-shielded according to the Carlvik two-term approximation for a single ring of fuel using the Stoker-Weiss method.
- Parameters:
C (float) – Dancoff correction factor.
Rfuel (float) – Radius of the fuel pellet.
Rin (float) – Inner radius of the fuel ring.
Rout (float) – Outer radius of the fuel ring.
ndl (NDLibrary) – Nuclear data library for cross section interpolation.
max_l (optional int) – Maximum legendre moment. If not provided, the max_legendre_order attribute is used. Default is None.
- Returns:
The macroscopic self-shielded cross section.
- Return type:
- roman_xs(self: scarabee._scarabee.Material, C: SupportsFloat, Ee: SupportsFloat, ndl: scarabee._scarabee.NDLibrary, max_l: SupportsInt | None = 1) scarabee._scarabee.CrossSection#
Computes the macroscopic material cross section, self-shielded according to the Roman two-term approximation.
- Parameters:
C (float) – Dancoff correction factor.
Ee (float) – Escpae cross section.
ndl (NDLibrary) – Nuclear data library for cross section interpolation.
max_l (optional int) – Maximum legendre moment. If not provided, the max_legendre_order attribute is used. Default is None.
- Returns:
The macroscopic self-shielded cross section.
- Return type:
- property size#
Number of nuclides in the material.
- property temperature#
Temperature of the material in kelvin.
- scarabee.borated_water(boron_ppm: SupportsFloat, temperature: SupportsFloat, pressure: SupportsFloat, ndl: scarabee._scarabee.NDLibrary) scarabee._scarabee.Material#
Makes a
Materialfor water at a desired temperature, pressure, and boron concentration.- Parameters:
boron_ppm (float) – Concentration of boron in parts per million.
temperature (float) – Temperature of the water in Kelvin.
pressure (float) – Pressure of the water in MPa.
ndl (NDLibrary) – Nuclear data library.
- Returns:
Material which contains borated water at the desired temperature, pressure, and concentration.
- Return type:
- scarabee.water_density(temperature: SupportsFloat, pressure: SupportsFloat) float#
Computes the density of water at a desired temperature and pressure.
- Parameters:
temperature (float) – Temperature of the water in Kelvin.
pressure (float) – Pressure of the water in MPa.
- Returns:
Density of the water in g/cm^3.
- Return type:
float
- class scarabee.MixingFraction#
Members:
Atoms : Indicates fractions are in Atoms.
Weight : Indicates fractions are in Weight.
Volume : Indicates fractions are in Volume.
- __init__(self: scarabee._scarabee.MixingFraction, value: SupportsInt) None#
- property name#
- scarabee.mix_materials(mats: collections.abc.Sequence[scarabee._scarabee.Material], fracs: collections.abc.Sequence[SupportsFloat], f: scarabee._scarabee.MixingFraction, ndl: scarabee._scarabee.NDLibrary) scarabee._scarabee.Material#
Creates a new material defined as a mixture of materials.
- Parameters:
mats (list of Material) – Materials in the mixture.
fracs (list of float) – Fraction for each material.
f (MixingFraction) – Indicates if provided fractions are in Atoms, Weight, or Volume.
ndl (NDLibrary) – Nuclear data library.
- Returns:
Mixture material with averaged temperature.
- Return type:
- class scarabee.FluxCalculator#
A FluxCalculator solves the neutron slowing down equation for a single resonant isotope plus any number of background isotopes which have constant cross sections and are pure scatterers.
- __init__(self: scarabee._scarabee.FluxCalculator, energy_boundaries: numpy.ndarray[numpy.float64], sig_t: numpy.ndarray[numpy.float64], sig_s: numpy.ndarray[numpy.float64], awr: SupportsFloat) None#
Creates a FluxCalculator instance for a resonant isotope.
- Parameters:
energy_boundaries (ndarray) – Boundaries of the energy groups from low to high energy.
sig_t (ndarray) – Microscopic total cross section of resonant isotope in each group.
sig_s (ndarray) – Microscopic scattering cross section of resonant isotope in each group.
awr (float) – Atomic weight ratio of thes resonant isotope.
- add_background_nuclide(self: scarabee._scarabee.FluxCalculator, arg0: SupportsFloat, arg1: SupportsFloat) None#
Adds a pure scattering background nuclide with constant cross section to the slowing down problem.
- Parameters:
sig_s (float) – Constant background scattering cross section for nuclide.
awr (float) – Atomic weight ratio of the nuclide.
- property alpha#
Slowing down parameter of the resonant nuclide ((awr - 1)/(awr + 1))^2.
- property avg_energy#
Average energy in each group from low to high energy in an ndarray.
- property awr#
Atomic weight ratio of the resonant nuclide.
- property chi#
Fixed fission source in each group from low to high energy in an ndarray.
- property energy_boundaries#
Boundaries of the energy groups from low to high energy in an ndarray.
- property flux#
Computed flux in each group from low to high energy in an ndarray.
- property sig_s#
Scattering cross section of the resonant nuclide in each group from low to high energy in an ndarray.
- property sig_t#
Total cross section of the resonant nuclide in each group from low to high energy in an ndarray.
- solve(self: scarabee._scarabee.FluxCalculator) None#
Solves the slowing down problem.