pointsource_sphere module¶
Module:
pointsource_sphere
- Description of this file:
Solution of the point source within a sphere
The heterogenous sphere is divided into multiple shells
Only the absorption reaction is considered here for simplicity
It is assumed that the source does not absrob the neutrons
Although the source radius is defined, it is over-written with zero
Created on Sat May 17 18:20:00 2025 @author: Dan Kotlyar Last updated on Mon May 19 11:30:00 2025 @author: Dan Kotlyar
email: dan.kotlyar@me.gatech.edu
- pointsource_sphere.PlotSigT(mc: PointSourceInSphere, yLower: float, yUpper: float)¶
Def for plotting sigma_total.
- Parameters:
mc – A PointSourceInSphere() object
yLower (int) – Lower bound for y axis on plot
yUpper (array) – Upper bound for y axis on plot
- class pointsource_sphere.PointSourceInSphere(nMC: int, S0: int, R: float, sigT: ndarray | list)¶
Bases:
object
MC solution for a point source positioned in an heterogenous sphere
- Parameters:
nMC (int) – number of repetitive monte carlo simulations
S0 (int) – number of source neutrons
R (float) – radius of the sphere in cm
sigT (array) – total cross section array for all the different regions
- inps¶
container with inputs
- Type:
dict
- resAN¶
container with analytic results
- Type:
dict
- resST¶
container with surface tracking results
- Type:
dict
- resDT¶
container with delta tracking results
- Type:
dict
- times¶
container with execution times
- Type:
dict
- Raises:
TypeError – if nMC is not int
ValueError – if nMC is not positive
- PlotDifferences()¶
Plots differences in fluxes
- PlotFluxes(scheme)¶
Plots neutron fluxes for a given method.
- Parameters:
scheme (str) – scheme to plot fluxes for (‘dt’, ‘wdt’, ‘all’, ‘st’)
- PrintFOM(scheme: str)¶
Prints FOM for the desired scheme
- Uses the average of the variance squared and time for the FOM:
FOM = 1/(sig^2 * time) where sig^2 = mean(sig^2(xyz)])
- Parameters:
scheme (str) – scheme to plot fluxes for (‘dt’, ‘wdt’, ‘all’, ‘st’)
- Solve(scheme)¶
MC solution using a specific random walk scheme
- Parameters:
scheme (str) – neutron tracking scheme [‘st’, ‘dt’, ‘analytic’, ‘wdt’]
- _Analytic()¶
Analytic solution
- _SolveDT()¶
MC solution using delta tracking
- _SolveST()¶
MC solution using ray tracking
- _SolveWDT()¶
MC solution using weighted delta tracking routine.
Uses a Russian Roulette threshold of 0.25 to discard particles.
Call via PointSourceInSphere() object.
Based on:
L.W.G. Morgan, D. Kotlyar, 2015. “Weighted-delta-tracking for Monte Carlo particle transport,” Annals of Nuclear Energy, 85, 1184-1188.
- class pointsource_sphere.WeightedNeutron¶
Bases:
object
A class for neutrons. Kinda simple right now but we would ideally use this more and more and expand on it as more methods are built/added.
Only currently used in the weighted delta tracking routine.
- inps¶
weight of the neutron
- Type:
weight
- setWeight(weight: float)¶
Updates the weight of the neutron.
- Parameters:
weight (float) – new weight of the neutron