depletion
– Read Tripoli-4 depletion results
Module to deal with ROOT outputs from Tripoli-4 in depletion mode.
This module is an interface with Tripoli-4 depletion results, stored as
ROOT
files, see the Tripoli-4 user guide and the ROOT website for more
details.
The available results match the usual Tripoli-4 results from depletion:
keff as
kcoll
,ktrack
,kstep
;β_:sub:eff from prompt and Nauchi, called
beff_prompt
andbeff_nauchi
;renormalisation factor, called
renorm
total power
power
local burnup
flux: fast neutron flux (
fast_flux
), thermal neutron flux (therm_flux
) and total flux (flux
)mass
concentration
activity
reaction rates: for fast neutrons (
fast_reaction_rate
), for thermal neutrons (thermal_reaction_rate
) and for one group (reaction_rate
). The thermal group only gives non-zero results for fission rate.
Some of these results can be accessed from valjean using the
DepletionReader
class from this module. In some cases, it is necessary
to provide keyword for the composition name (componame
), the isotope name
(isotope
) or the reaction name (reaction
).
Results can be obtained at a given depletion step (so a scalar value) or for
all available steps, giving in both cases a
Dataset
. The access method of the array ends
with _time
if the required quantity is given in function of time and
_burnup
if it is in function of burnup.
A typical example of use of this module is the following:
from valjean.eponine.tripoli4.depletion import DepletionReader
depr = DepletionReader.from_evolution_steps(
'evolution_1.root', 'evolution_2.root',
root_build='/path/where/to/build/root/libraries')
# get kstep at step 1
kstep = depr.kstep(1)
# get kstep as a function of burnup
akstep = depr.kstep_burnup()
# get total power as a function of time
atotpow = depr.total_power_time()
# get U238 concentration in composition COMPO1 at step 5
conc_u238 = depr.concentration(step=5, componame='COMPO1', isotope='U238')
# get U238 fission reaction rate in composition COMP1 as a function of time
reac_u238 = depr.reaction_rate_time(componame='COMP1', isotope='U238',
reaction='REAMT18')
Some helper methods provide the list of compositions, the list of isotopes in a given composition or the reaction rates associated to a given isotope in a given composition.
- valjean.eponine.tripoli4.depletion.title_to_snake_case(word)[source]
Convert word from title case to snake case.
>>> title_to_snake_case('ThisIsATitle') 'this_is_a_title'
- valjean.eponine.tripoli4.depletion.generic_docstrings(res_type, *list_params)[source]
Define generic docstrings for the access functions of depleted results.
- valjean.eponine.tripoli4.depletion.add_accessors(dict_res)[source]
Automatic construction of result accessors.
- class valjean.eponine.tripoli4.depletion.DepletionReader(mbr)[source]
Class to use depletion results from Tripoli-4
- static init_postscripts(root_build='')[source]
Initialize postscripts from ROOT macros.
ROOT macros are in the resources/depletion folder. They are compiled in the __t4depletion__ folder to used afterwards.
- classmethod from_evolution_steps(*fnames, root_build='')[source]
Initialisation from evolution.root files (one per simulation).
- Parameters:
fnames (str) – ROOT files
- classmethod from_mbr(fname, mbr_name, root_build='')[source]
Initialisation from ROOT file containing a MeanBurnupResults class.
- save_mbr(name)[source]
Save the MeanBurnupResults in a ROOT file.
- Parameters:
name (str) – name of the output ROOT file name
- burnup_array()[source]
Return burnup array from MeanBurnupResults object.
- Returns:
burnup value and error by step
- Return type:
- time_array()[source]
Return time array from MeanBurnupResults object.
- Returns:
time value and error by step
- Return type:
- isotope_names(step, componame)[source]
Return the list of isotopes in the given composition at the given step.
- reaction_names(step, componame, isotope)[source]
Get reaction names in composition for the given isotope.
- isotope_reaction_names(step, componame)[source]
Get dictionary of reactions per isotope for the given step and composition.
- activity(step, **kwargs)
Return the value of Activity from the MeanBurnupResults object.
- activity_burnup(**kwargs)
Return the Activity from the MeanBurnupResults object as a function of burnup.
Note
The unit of the x-axis is not currently preserved as units are not taken into account in
Dataset
.
- activity_time(**kwargs)
Return the Activity from the MeanBurnupResults object as a function of time.
Note
The unit of the x-axis is not currently preserved as units are not taken into account in
Dataset
.
- beff_nauchi(step, **kwargs)
Return the value of BeffNauchi from the MeanBurnupResults object.
- beff_nauchi_burnup(**kwargs)
Return the BeffNauchi from the MeanBurnupResults object as a function of burnup.
Note
The unit of the x-axis is not currently preserved as units are not taken into account in
Dataset
.- Returns:
BeffNauchi and error as a function of burnup steps
- Return type:
- beff_nauchi_time(**kwargs)
Return the BeffNauchi from the MeanBurnupResults object as a function of time.
Note
The unit of the x-axis is not currently preserved as units are not taken into account in
Dataset
.- Returns:
BeffNauchi and error as a function of time steps
- Return type:
- beff_prompt(step, **kwargs)
Return the value of BeffPrompt from the MeanBurnupResults object.
- beff_prompt_burnup(**kwargs)
Return the BeffPrompt from the MeanBurnupResults object as a function of burnup.
Note
The unit of the x-axis is not currently preserved as units are not taken into account in
Dataset
.- Returns:
BeffPrompt and error as a function of burnup steps
- Return type:
- beff_prompt_time(**kwargs)
Return the BeffPrompt from the MeanBurnupResults object as a function of time.
Note
The unit of the x-axis is not currently preserved as units are not taken into account in
Dataset
.- Returns:
BeffPrompt and error as a function of time steps
- Return type:
- concentration(step, **kwargs)
Return the value of Concentration from the MeanBurnupResults object.
- concentration_burnup(**kwargs)
Return the Concentration from the MeanBurnupResults object as a function of burnup.
Note
The unit of the x-axis is not currently preserved as units are not taken into account in
Dataset
.
- concentration_time(**kwargs)
Return the Concentration from the MeanBurnupResults object as a function of time.
Note
The unit of the x-axis is not currently preserved as units are not taken into account in
Dataset
.
- fast_flux(step, **kwargs)
Return the value of FastFlux from the MeanBurnupResults object.
- fast_flux_burnup(**kwargs)
Return the FastFlux from the MeanBurnupResults object as a function of burnup.
Note
The unit of the x-axis is not currently preserved as units are not taken into account in
Dataset
.
- fast_flux_time(**kwargs)
Return the FastFlux from the MeanBurnupResults object as a function of time.
Note
The unit of the x-axis is not currently preserved as units are not taken into account in
Dataset
.
- fast_reaction_rate(step, **kwargs)
Return the value of FastReactionRate from the MeanBurnupResults object.
- fast_reaction_rate_burnup(**kwargs)
Return the FastReactionRate from the MeanBurnupResults object as a function of burnup.
Note
The unit of the x-axis is not currently preserved as units are not taken into account in
Dataset
.
- fast_reaction_rate_time(**kwargs)
Return the FastReactionRate from the MeanBurnupResults object as a function of time.
Note
The unit of the x-axis is not currently preserved as units are not taken into account in
Dataset
.
- kcoll(step, **kwargs)
Return the value of Kcoll from the MeanBurnupResults object.
- kcoll_burnup(**kwargs)
Return the Kcoll from the MeanBurnupResults object as a function of burnup.
Note
The unit of the x-axis is not currently preserved as units are not taken into account in
Dataset
.- Returns:
Kcoll and error as a function of burnup steps
- Return type:
- kcoll_time(**kwargs)
Return the Kcoll from the MeanBurnupResults object as a function of time.
Note
The unit of the x-axis is not currently preserved as units are not taken into account in
Dataset
.- Returns:
Kcoll and error as a function of time steps
- Return type:
- kstep(step, **kwargs)
Return the value of Kstep from the MeanBurnupResults object.
- kstep_burnup(**kwargs)
Return the Kstep from the MeanBurnupResults object as a function of burnup.
Note
The unit of the x-axis is not currently preserved as units are not taken into account in
Dataset
.- Returns:
Kstep and error as a function of burnup steps
- Return type:
- kstep_time(**kwargs)
Return the Kstep from the MeanBurnupResults object as a function of time.
Note
The unit of the x-axis is not currently preserved as units are not taken into account in
Dataset
.- Returns:
Kstep and error as a function of time steps
- Return type:
- ktrack(step, **kwargs)
Return the value of Ktrack from the MeanBurnupResults object.
- ktrack_burnup(**kwargs)
Return the Ktrack from the MeanBurnupResults object as a function of burnup.
Note
The unit of the x-axis is not currently preserved as units are not taken into account in
Dataset
.- Returns:
Ktrack and error as a function of burnup steps
- Return type:
- ktrack_time(**kwargs)
Return the Ktrack from the MeanBurnupResults object as a function of time.
Note
The unit of the x-axis is not currently preserved as units are not taken into account in
Dataset
.- Returns:
Ktrack and error as a function of time steps
- Return type:
- local_burnup(step, **kwargs)
Return the value of LocalBurnup from the MeanBurnupResults object.
- local_burnup_burnup(**kwargs)
Return the LocalBurnup from the MeanBurnupResults object as a function of burnup.
Note
The unit of the x-axis is not currently preserved as units are not taken into account in
Dataset
.
- local_burnup_time(**kwargs)
Return the LocalBurnup from the MeanBurnupResults object as a function of time.
Note
The unit of the x-axis is not currently preserved as units are not taken into account in
Dataset
.
- mass(step, **kwargs)
Return the value of Mass from the MeanBurnupResults object.
- mass_burnup(**kwargs)
Return the Mass from the MeanBurnupResults object as a function of burnup.
Note
The unit of the x-axis is not currently preserved as units are not taken into account in
Dataset
.
- mass_time(**kwargs)
Return the Mass from the MeanBurnupResults object as a function of time.
Note
The unit of the x-axis is not currently preserved as units are not taken into account in
Dataset
.
- power(step, **kwargs)
Return the value of Power from the MeanBurnupResults object.
- power_burnup(**kwargs)
Return the Power from the MeanBurnupResults object as a function of burnup.
Note
The unit of the x-axis is not currently preserved as units are not taken into account in
Dataset
.
- power_time(**kwargs)
Return the Power from the MeanBurnupResults object as a function of time.
Note
The unit of the x-axis is not currently preserved as units are not taken into account in
Dataset
.
- reaction_rate(step, **kwargs)
Return the value of ReactionRate from the MeanBurnupResults object.
- reaction_rate_burnup(**kwargs)
Return the ReactionRate from the MeanBurnupResults object as a function of burnup.
Note
The unit of the x-axis is not currently preserved as units are not taken into account in
Dataset
.
- reaction_rate_time(**kwargs)
Return the ReactionRate from the MeanBurnupResults object as a function of time.
Note
The unit of the x-axis is not currently preserved as units are not taken into account in
Dataset
.
- renorm(step, **kwargs)
Return the value of Renorm from the MeanBurnupResults object.
- renorm_burnup(**kwargs)
Return the Renorm from the MeanBurnupResults object as a function of burnup.
Note
The unit of the x-axis is not currently preserved as units are not taken into account in
Dataset
.- Returns:
Renorm and error as a function of burnup steps
- Return type:
- renorm_time(**kwargs)
Return the Renorm from the MeanBurnupResults object as a function of time.
Note
The unit of the x-axis is not currently preserved as units are not taken into account in
Dataset
.- Returns:
Renorm and error as a function of time steps
- Return type:
- therm_flux(step, **kwargs)
Return the value of ThermFlux from the MeanBurnupResults object.
- therm_flux_burnup(**kwargs)
Return the ThermFlux from the MeanBurnupResults object as a function of burnup.
Note
The unit of the x-axis is not currently preserved as units are not taken into account in
Dataset
.
- therm_flux_time(**kwargs)
Return the ThermFlux from the MeanBurnupResults object as a function of time.
Note
The unit of the x-axis is not currently preserved as units are not taken into account in
Dataset
.
- thermal_reaction_rate(step, **kwargs)
Return the value of ThermalReactionRate from the MeanBurnupResults object.
- thermal_reaction_rate_burnup(**kwargs)
Return the ThermalReactionRate from the MeanBurnupResults object as a function of burnup.
Note
The unit of the x-axis is not currently preserved as units are not taken into account in
Dataset
.
- thermal_reaction_rate_time(**kwargs)
Return the ThermalReactionRate from the MeanBurnupResults object as a function of time.
Note
The unit of the x-axis is not currently preserved as units are not taken into account in
Dataset
.
- total_power(step, **kwargs)
Return the value of TotalPower from the MeanBurnupResults object.
- exception valjean.eponine.tripoli4.depletion.DepletionReaderException[source]
An error that may be raised by the
DepletionReader
class.