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 and beff_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

__init__(mbr)[source]

Initialisation of DepletionReader.

Parameters:

mbr – MeanBurnupResult

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.

Parameters:
  • fname (str) – ROOT file name

  • mbr_name (str) – name of the MeanBurnupResults object in the file

save_mbr(name)[source]

Save the MeanBurnupResults in a ROOT file.

Parameters:

name (str) – name of the output ROOT file name

nb_simu()[source]

Return the number of independent simulations.

Return type:

int

nb_compositions()[source]

Return the number of compositions.

:rtype; int

nb_steps()[source]

Return the number of steps.

Return type:

int

burnup(step)[source]

Return burnup from MeanBurnupResults object.

Parameters:

step (int) – calculation step to use to get the value

Returns:

burnup value and error

Return type:

Dataset

burnup_array()[source]

Return burnup array from MeanBurnupResults object.

Returns:

burnup value and error by step

Return type:

Dataset

time(step)[source]

Return time from MeanBurnupResults object.

Parameters:

step (int) – calculation step to use to get the value

Returns:

time value and error

Return type:

Dataset

time_array()[source]

Return time array from MeanBurnupResults object.

Returns:

time value and error by step

Return type:

Dataset

composition_names()[source]

Return the list of composition names.

Return type:

list(str)

isotope_names(step, componame)[source]

Return the list of isotopes in the given composition at the given step.

Parameters:
  • step (int) – calculation step to use to get the value

  • componame (str) – composition name in which list of isotopes is required

Returns:

list of available isotopes

Return type:

list(str)

reaction_names(step, componame, isotope)[source]

Get reaction names in composition for the given isotope.

Parameters:
  • step (int) – calculation step to use to get the value

  • componame (str) – composition name where reaction is required

  • isotope (str) – isotope name for which reaction is required

Returns:

list of available reactions

Return type:

list(str)

isotope_reaction_names(step, componame)[source]

Get dictionary of reactions per isotope for the given step and composition.

Parameters:
  • step (int) – calculation step to use to get the value

  • componame (str) – composition name where reactions per isotope are required

Returns:

reactions by isotopes

Return type:

dict(str, list(str))

dump_global_results(step)[source]

Print results for a given step.

This includes compositions.

activity(step, **kwargs)

Return the value of Activity from the MeanBurnupResults object.

Parameters:
  • step (int) – the index of the calculation step

  • componame (str) – composition name for Activity

  • isotope (str) – isotope which Activity is required

Returns:

Activity and error for the given step

Return type:

Dataset

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.

Parameters:
  • componame (str) – composition name for Activity

  • isotope (str) – isotope which Activity is required

Returns:

Activity and error as a function of burnup steps

Return type:

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.

Parameters:
  • componame (str) – composition name for Activity

  • isotope (str) – isotope which Activity is required

Returns:

Activity and error as a function of time steps

Return type:

Dataset

beff_nauchi(step, **kwargs)

Return the value of BeffNauchi from the MeanBurnupResults object.

Parameters:

step (int) – the index of the calculation step

Returns:

BeffNauchi and error for the given step

Return type:

Dataset

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:

Dataset

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:

Dataset

beff_prompt(step, **kwargs)

Return the value of BeffPrompt from the MeanBurnupResults object.

Parameters:

step (int) – the index of the calculation step

Returns:

BeffPrompt and error for the given step

Return type:

Dataset

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:

Dataset

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:

Dataset

concentration(step, **kwargs)

Return the value of Concentration from the MeanBurnupResults object.

Parameters:
  • step (int) – the index of the calculation step

  • componame (str) – composition name for Concentration

  • isotope (str) – isotope which Concentration is required

Returns:

Concentration and error for the given step

Return type:

Dataset

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.

Parameters:
  • componame (str) – composition name for Concentration

  • isotope (str) – isotope which Concentration is required

Returns:

Concentration and error as a function of burnup steps

Return type:

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.

Parameters:
  • componame (str) – composition name for Concentration

  • isotope (str) – isotope which Concentration is required

Returns:

Concentration and error as a function of time steps

Return type:

Dataset

fast_flux(step, **kwargs)

Return the value of FastFlux from the MeanBurnupResults object.

Parameters:
  • step (int) – the index of the calculation step

  • componame (str) – composition name for FastFlux

Returns:

FastFlux and error for the given step

Return type:

Dataset

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.

Parameters:

componame (str) – composition name for FastFlux

Returns:

FastFlux and error as a function of burnup steps

Return type:

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.

Parameters:

componame (str) – composition name for FastFlux

Returns:

FastFlux and error as a function of time steps

Return type:

Dataset

fast_reaction_rate(step, **kwargs)

Return the value of FastReactionRate from the MeanBurnupResults object.

Parameters:
  • step (int) – the index of the calculation step

  • componame (str) – composition name for FastReactionRate

  • isotope (str) – isotope which FastReactionRate is required

  • reaction (str) – reaction name

Returns:

FastReactionRate and error for the given step

Return type:

Dataset

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.

Parameters:
  • componame (str) – composition name for FastReactionRate

  • isotope (str) – isotope which FastReactionRate is required

  • reaction (str) – reaction name

Returns:

FastReactionRate and error as a function of burnup steps

Return type:

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.

Parameters:
  • componame (str) – composition name for FastReactionRate

  • isotope (str) – isotope which FastReactionRate is required

  • reaction (str) – reaction name

Returns:

FastReactionRate and error as a function of time steps

Return type:

Dataset

kcoll(step, **kwargs)

Return the value of Kcoll from the MeanBurnupResults object.

Parameters:

step (int) – the index of the calculation step

Returns:

Kcoll and error for the given step

Return type:

Dataset

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:

Dataset

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:

Dataset

kstep(step, **kwargs)

Return the value of Kstep from the MeanBurnupResults object.

Parameters:

step (int) – the index of the calculation step

Returns:

Kstep and error for the given step

Return type:

Dataset

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:

Dataset

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:

Dataset

ktrack(step, **kwargs)

Return the value of Ktrack from the MeanBurnupResults object.

Parameters:

step (int) – the index of the calculation step

Returns:

Ktrack and error for the given step

Return type:

Dataset

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:

Dataset

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:

Dataset

local_burnup(step, **kwargs)

Return the value of LocalBurnup from the MeanBurnupResults object.

Parameters:
  • step (int) – the index of the calculation step

  • componame (str) – composition name for LocalBurnup

Returns:

LocalBurnup and error for the given step

Return type:

Dataset

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.

Parameters:

componame (str) – composition name for LocalBurnup

Returns:

LocalBurnup and error as a function of burnup steps

Return type:

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.

Parameters:

componame (str) – composition name for LocalBurnup

Returns:

LocalBurnup and error as a function of time steps

Return type:

Dataset

mass(step, **kwargs)

Return the value of Mass from the MeanBurnupResults object.

Parameters:
  • step (int) – the index of the calculation step

  • componame (str) – composition name for Mass

  • isotope (str) – isotope which Mass is required

Returns:

Mass and error for the given step

Return type:

Dataset

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.

Parameters:
  • componame (str) – composition name for Mass

  • isotope (str) – isotope which Mass is required

Returns:

Mass and error as a function of burnup steps

Return type:

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.

Parameters:
  • componame (str) – composition name for Mass

  • isotope (str) – isotope which Mass is required

Returns:

Mass and error as a function of time steps

Return type:

Dataset

power(step, **kwargs)

Return the value of Power from the MeanBurnupResults object.

Parameters:
  • step (int) – the index of the calculation step

  • componame (str) – composition name for Power

Returns:

Power and error for the given step

Return type:

Dataset

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.

Parameters:

componame (str) – composition name for Power

Returns:

Power and error as a function of burnup steps

Return type:

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.

Parameters:

componame (str) – composition name for Power

Returns:

Power and error as a function of time steps

Return type:

Dataset

reaction_rate(step, **kwargs)

Return the value of ReactionRate from the MeanBurnupResults object.

Parameters:
  • step (int) – the index of the calculation step

  • componame (str) – composition name for ReactionRate

  • isotope (str) – isotope which ReactionRate is required

  • reaction (str) – reaction name

Returns:

ReactionRate and error for the given step

Return type:

Dataset

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.

Parameters:
  • componame (str) – composition name for ReactionRate

  • isotope (str) – isotope which ReactionRate is required

  • reaction (str) – reaction name

Returns:

ReactionRate and error as a function of burnup steps

Return type:

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.

Parameters:
  • componame (str) – composition name for ReactionRate

  • isotope (str) – isotope which ReactionRate is required

  • reaction (str) – reaction name

Returns:

ReactionRate and error as a function of time steps

Return type:

Dataset

renorm(step, **kwargs)

Return the value of Renorm from the MeanBurnupResults object.

Parameters:

step (int) – the index of the calculation step

Returns:

Renorm and error for the given step

Return type:

Dataset

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:

Dataset

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:

Dataset

therm_flux(step, **kwargs)

Return the value of ThermFlux from the MeanBurnupResults object.

Parameters:
  • step (int) – the index of the calculation step

  • componame (str) – composition name for ThermFlux

Returns:

ThermFlux and error for the given step

Return type:

Dataset

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.

Parameters:

componame (str) – composition name for ThermFlux

Returns:

ThermFlux and error as a function of burnup steps

Return type:

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.

Parameters:

componame (str) – composition name for ThermFlux

Returns:

ThermFlux and error as a function of time steps

Return type:

Dataset

thermal_reaction_rate(step, **kwargs)

Return the value of ThermalReactionRate from the MeanBurnupResults object.

Parameters:
  • step (int) – the index of the calculation step

  • componame (str) – composition name for ThermalReactionRate

  • isotope (str) – isotope which ThermalReactionRate is required

  • reaction (str) – reaction name

Returns:

ThermalReactionRate and error for the given step

Return type:

Dataset

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.

Parameters:
  • componame (str) – composition name for ThermalReactionRate

  • isotope (str) – isotope which ThermalReactionRate is required

  • reaction (str) – reaction name

Returns:

ThermalReactionRate and error as a function of burnup steps

Return type:

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.

Parameters:
  • componame (str) – composition name for ThermalReactionRate

  • isotope (str) – isotope which ThermalReactionRate is required

  • reaction (str) – reaction name

Returns:

ThermalReactionRate and error as a function of time steps

Return type:

Dataset

total_power(step, **kwargs)

Return the value of TotalPower from the MeanBurnupResults object.

Parameters:

step (int) – the index of the calculation step

Returns:

TotalPower and error for the given step

Return type:

Dataset

total_power_burnup(**kwargs)

Return the TotalPower 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:

TotalPower and error as a function of burnup steps

Return type:

Dataset

total_power_time(**kwargs)

Return the TotalPower 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:

TotalPower and error as a function of time steps

Return type:

Dataset

exception valjean.eponine.tripoli4.depletion.DepletionReaderException[source]

An error that may be raised by the DepletionReader class.