Annular Collision Probabilities#
- class scarabee.CylindricalCell#
A CylindricalCell object represents a one dimensional annular problem (generally a pin cell), that is solved with the method of collision probabilities. This object is responsible for computing the collision probabilities, the different response fluxes, and the multicollision blackness in each group.
- Gamma(self: scarabee._scarabee.CylindricalCell, g: SupportsInt) float#
Multicollision blackness. The probability of neutrons entering through the outer surface Sb are absorbed.
- Parameters:
g (int) – Energy group index.
- Returns:
Multicollision blackness.
- Return type:
float
- property Sb#
Outer surface area (circumference) of cell.
- X(self: scarabee._scarabee.CylindricalCell, a: SupportsFloat, g: SupportsInt, i: SupportsInt, k: SupportsInt) float#
Source response flux. This is the flux in region i cause by a unit source in region k, in group g.
- Parameters:
a (float) – Albedo of outer boundary.
g (int) – Energy group index.
i (int) – Region index for response.
k (int) – Region index for source.
- Returns:
Source response flux.
- Return type:
float
- Y(self: scarabee._scarabee.CylindricalCell, a: SupportsFloat, g: SupportsInt, i: SupportsInt) float#
Current response flux. This is the flux in region i cause by a neutron entering the cell from the outer surface (with albedo a) in group g.
- Parameters:
a (float) – Albedo of outer boundary.
g (int) – Energy group index.
i (int) – Region index.
- Returns:
Current response flux.
- Return type:
float
- __init__(self: scarabee._scarabee.CylindricalCell, radii: collections.abc.Sequence[SupportsFloat], mats: collections.abc.Sequence[scarabee._scarabee.CrossSection]) None#
Creates a CylindricalCell object for a 1D annular pin cell.
- Parameters:
radii (list of float) – List of region radii.
mats (list of CrossSection) – List of
CrossSectionfor each region.
- property ngroups#
Number of energy groups.
- property nregions#
Number of annular regions.
- p(self: scarabee._scarabee.CylindricalCell, g: SupportsInt, i: SupportsInt, k: SupportsInt) float#
Symmetric collision probability for a neutron in region i to collide in region k. This matrix is symmetric, so p(i -> k) = p(k -> i).
- Parameters:
g (int) – Energy group index.
i (int) – Region index for origin.
k (int) – Region index for destination.
- Returns:
Symmetric collision probability.
- Return type:
float
- radius(self: scarabee._scarabee.CylindricalCell, i: SupportsInt) float#
Radius of region i.
- Parameters:
i (int) – Region index.
- Returns:
Radius of region.
- Return type:
float
- solve(self: scarabee._scarabee.CylindricalCell, parallel: bool = False) None#
Solves the system for partial flux responses.
- Parameters:
parallel (bool) – If True, solves the cell in parallel. Default is False.
- property solved#
True is the system has been solved, False otherwise.
- volume(self: scarabee._scarabee.CylindricalCell, i: SupportsInt) float#
Volume of region i.
- Parameters:
i (int) – Region index.
- Returns:
Volume of the region.
- Return type:
float
- x(self: scarabee._scarabee.CylindricalCell, g: SupportsInt, i: SupportsInt) float#
First escape probability to the boundary from region i. This is the probability that a source neutron born in region i will reach the boundary for the first time.
- Parameters:
g (int) – Energy group index.
i (int) – Region index.
- Returns:
First escape probability.
- Return type:
float
- xs(self: scarabee._scarabee.CylindricalCell, i: SupportsInt) scarabee._scarabee.CrossSection#
CrossSection in region i.
- Parameters:
i (float) – Region index.
Returns –
CrossSection – Cross section in region i.
- class scarabee.CylindricalFluxSolver#
A CylindricalFluxSolver object computes the static flux in a 1D annular pin cell, based on the collision probabilities and response fluxes provided by a
CylindricalCellinstance.- __init__(self: scarabee._scarabee.CylindricalFluxSolver, cell: scarabee._scarabee.CylindricalCell) None#
Flux solver for a 1D annular cell problem.
- Parameters:
cell (CylindricalCell) – Pin cell in which to find the flux.
- property albedo#
Albedo for outer cell boundary.
- extern_src(self: scarabee._scarabee.CylindricalFluxSolver, i: SupportsInt, g: SupportsInt) float#
Returns the external source in Flat Source Region i.
- Parameters:
i (int) – Flat Source Region index.
g (int) – Energy group index.
- Returns:
Value of the external source at position r.
- Return type:
float
- flux(self: scarabee._scarabee.CylindricalFluxSolver, i: SupportsInt, g: SupportsInt) float#
Flux in region i, group g.
- Parameters:
i (int) – Region index.
g (int) – Energy group index.
- Returns:
Flux in region i group g.
- Return type:
float
- property flux_tolerance#
Tolerance for flux convergence.
- homogenize(*args, **kwargs)#
Overloaded function.
homogenize(self: scarabee._scarabee.CylindricalFluxSolver) -> scarabee._scarabee.CrossSection
Computes a homogenized set of cross sections for the problem.
- Returns:
Homogenized cross section.
- Return type:
homogenize(self: scarabee._scarabee.CylindricalFluxSolver, i_max: typing.SupportsInt) -> scarabee._scarabee.CrossSection
Computes a homogenized set of cross sections for all regions up to and including i_max.
- Parameters:
i_max (int) – Maximum region index (inclusive) for homogenization.
- Returns:
Homogenized cross section.
- Return type:
homogenize(self: scarabee._scarabee.CylindricalFluxSolver, regions: collections.abc.Sequence[typing.SupportsInt]) -> scarabee._scarabee.CrossSection
Computes a homogenized set of cross sections for all provided regions.
- Parameters:
regions (list of int) – List of regions for homogenization.
- Returns:
Homogenized cross section.
- Return type:
- homogenize_flux_spectrum(*args, **kwargs)#
Overloaded function.
homogenize_flux_spectrum(self: scarabee._scarabee.CylindricalFluxSolver) -> numpy.ndarray[numpy.float64]
Computes a homogenized flux spectrum which can be used for energy condensation.
- Returns:
Homogenized flux spectrum.
- Return type:
ndarray of floats
homogenize_flux_spectrum(self: scarabee._scarabee.CylindricalFluxSolver, arg0: typing.SupportsInt) -> numpy.ndarray[numpy.float64]
Computes a homogenized flux spectrum which can be used for energy condensation for all regions up to an including i_max.
- Parameters:
i_max (int) – Maximum region index (inclusive) for homogenization.
- Returns:
Homogenized flux spectrum.
- Return type:
ndarray of floats
homogenize_flux_spectrum(self: scarabee._scarabee.CylindricalFluxSolver, regions: collections.abc.Sequence[typing.SupportsInt]) -> numpy.ndarray[numpy.float64]
Computes a homogenized flux spectrum which can be used for energy condensation for all provided regions.
- Parameters:
regions (list of int) – List of regions for homogenization.
- Returns:
Homogenized flux spectrum.
- Return type:
ndarray of floats
- j(self: scarabee._scarabee.CylindricalFluxSolver, g: SupportsInt) float#
Net current out of cell in group g.
- Parameters:
g (int) – Energy group index.
- Returns:
Net current in group g.
- Return type:
float
- j_ext(self: scarabee._scarabee.CylindricalFluxSolver, g: SupportsInt) float#
External current at boundary in group g.
- Parameters:
g (int) – Energy group index.
- Returns:
External current in group g.
- Return type:
float
- j_neg(self: scarabee._scarabee.CylindricalFluxSolver, g: SupportsInt) float#
Inward current into the cell in group g.
- Parameters:
g (int) – Energy group index.
- Returns:
Inward current in group g.
- Return type:
float
- j_pos(self: scarabee._scarabee.CylindricalFluxSolver, g: SupportsInt) float#
Outward current from the cell in group g.
- Parameters:
g (int) – Energy group index.
- Returns:
Outward current in group g.
- Return type:
float
- property keff#
Multiplication factor of cell (only valid if solved is True).
- property keff_tolerance#
Tolerance for keff convergence.
- property ngroups#
Number of energy groups.
- property nregions#
Number of annular regions.
- set_extern_src(self: scarabee._scarabee.CylindricalFluxSolver, i: SupportsInt, g: SupportsInt, src: SupportsFloat) None#
Sets the external source in Flat Source Region with index i.
- Parameters:
i (int) – Flat Source Region index.
g (int) – Energy group index.
src (float) – Value of source in the FSR.
- set_j_ext(self: scarabee._scarabee.CylindricalFluxSolver, g: SupportsInt, j: SupportsFloat) None#
Sets the external current at the boundary in group g.
- Parameters:
g (int) – Energy group index.
j (float) – External current.
- property sim_mode#
SimulationModedescribing type of simulation (fixed-source or keff).
- solve(self: scarabee._scarabee.CylindricalFluxSolver, parallel: bool = False) None#
Solves the system for the flux and eigenvalue.
- Parameters:
parallel (bool) – If True, solves the cell in parallel. Default is False.
- property solved#
True if the system has been solved, False otherwise.
- volume(self: scarabee._scarabee.CylindricalFluxSolver, i: SupportsInt) float#
Volume of region i.
- Parameters:
i (int) – Region index.
- Returns:
Volume of region i.
- Return type:
float
- xs(self: scarabee._scarabee.CylindricalFluxSolver, i: SupportsInt) scarabee._scarabee.CrossSection#
CrossSection in region i.
- Parameters:
i (int) – Region index.
- Returns:
Cross sections in region i.
- Return type: