pillager.pillager¶
Classes
|
Class for conducting coupled criticality search-burnup calculations in the Serpent 2 radiation transport code. |
- class pillager.pillager.Pillager¶
Class for conducting coupled criticality search-burnup calculations in the Serpent 2 radiation transport code.
Individual functions can also be used to conduct variable search using secant, regressive secant, or generalized regressive secant methods.
- blacklist_dir_files()¶
Designates current directory files as blacklisted from movement.
- generalized_regressive_secant(xs, fs, sigs)¶
Conducts a generalized regressive secant evaluation to find next search value.
- Parameters:
xs (float, list of floats) – Initial and/or previous input values to be used in the search. Requires at least two starting values.
fs (float, list of floats) – Function values corresponding to the xs values provided.
sigs (float, list of floats) – Statistical uncertainties corresponding to the function values provided.
- Return type:
float
- get_detector_values(file_name)¶
Gets detector values from Serpent simulation detector output file.
- Parameters:
file_name (str) – Name of the Serpent results file (.det file).
- Return type:
Pandas Dataframe
- get_eigenvalue()¶
Gets implicit eigenvalue and uncertainty from Serpent results output file (serpent.i.res).
- Returns:
Tuple containing the implicit k-eigenvalue and its statistical uncertainty.
- Return type:
tuple
- move_files(step=0)¶
Moves generated input and output files for a given timestep.
- Parameters:
step (int or float) – Burnup step associated with files. Unblacklisted files in directory will be moved to this burnup step folder. Defaults to zero.
- pillage()¶
Conducts a full coupled criticality search-burnup calculation over the designated burnup steps.
- regressive_secant(xs, fs)¶
Conducts a regressive secant evaluation to find next search value.
- Parameters:
xs (float, list of floats) – Initial and/or previous input values to be used in the search. Requires at least two starting values.
fs (float, list of floats) – Function values corresponding to the xs values provided.
- Return type:
float
- run_search(config, function=False)¶
Conducts criticality search by default. If a function is provided, a generic search will be conducted.
- Parameters:
config (str) – Determines the format of the input file used in the search. Can be ‘initial’ or ‘’.
function (function object)
- Returns:
Contains maximum, minimum, and critical k-eigenvalues and the associated critical search value, respectively. If a generic search, the list contains search values with the last element being the final value.
- Return type:
list
- run_serpent()¶
Runs the generated serpent input file.
- write_serpent(x, particles, config, step=0)¶
Writes serpent input files.
- Parameters:
x (float) – The value used for determining control surface positioning in the control_base.i file.
particles (int) – The number of particles per generation to use in the Serpent simulation.
config (str) – Determines the format of the input file. Can be ‘initial’, ‘initialBurn’, ‘burn’, or ‘’.
step (int or float) – Burnup step to use for burnup calculation. Defaults to zero.
- Returns:
Generates serpent.i file.
- Return type:
file