Page 1 of 1

2.1.32 - Sensitivity calculation and uncertainty propagation

Posted: Fri Feb 26, 2021 3:56 pm
by Ville Valtavirta
Hi everyone,

the sensitivity calculation and uncertainty propagation capabilities saw some fixed bugs and minor improvements in 2.1.32. I'll try to list the main ones in this topic, and update any new features to the Serpent Wiki in the near future.

We have an enthusiastic S/U community using the capabilities of Serpent and I'm thankful for all the reported bugs.

First a short list of bugfixes:
  • Fixed a bug where log-log interpolation could not be used for the data linked to xGPT-perturbations.
  • Fixed a bug where xGPT-perturbations resulted in always zero sensitivities in some cases.
  • Fixed a bug in the output of energy integrated sensitivities, where the printing skipped the results for the first zai and material instead of skipping the printout of "lost" data as intended.
  • Fixed a bug related to MT indexing lists printed out when printing sensitivity output, which importantly left out the indexes for thermal scattering MTs 1002 and 1004.
  • Fixed a bug (or feature) where the total nubar was automatically removed from covariance matrices.
  • Fixed a bug where covariance block variances were truncated to zero although negative values should be allowed at the block level as cross covariances may produce negative variance. The total variance is still truncated to zero if it is negative.
New features/improvements:
  • Added support for plain ASCII covariance data files (previously only the COVERX-format used by SCALE was supported).
    Such files can be linked using set covlib. The format expected by Serpent is as follows:

    Code: Select all

    <E0> <E1> ... <EnGroup+1>
    <ZAI1> <mt1> <ZAI2> <mt2>
    <c1,1> <c1,2> ... <c1,nGroup>
    <c2,1> <c2,2> ... <c1,nGroup>
    <cnGroup,1> ... <cnGroup,nGroup>
    <ZAI1> <mt1> <ZAI2> <mt2>
    <c1,1> <c1,2> ... <c1,nGroup>
    <c2,1> <c2,2> ... <c1,nGroup>
    <cnGroup,1> ... <cnGroup,nGroup>
  • Added support for "wrong" endianness binary COVERX-files. The endianness is now tested based on the known first block size and the byte orders of all values are reversed if needed.
  • Including MT 4 or MT 18 for sensitivity calculation now automatically includes the partial reaction modes.
  • Added ease-of-access output of S*COV and S vectors corresponding to each covariance "block" in the sensitivity output. These can be used e.g. for similarity assessments by taking S*COV from application A and S from application B. The names of the array in <input>_sens<idx>.m are




    containing the product of
    1. Energy-group sensitivity of k-eff to perturbation of cross section of MT 107 of Iron-57.
    2. The covariance matrix for MT 107 of Iron-57.

    The corresponding sensitivity vector KEFF_S_2605700107 would directly have the aforementioned sensitivity.

    Multiple ZAIMT's may be included in the same _S_ or _SCOV_ array if the covariance "block" contains cross covariances between the different ZAIMT's. In that case the sensitivity vectors will have the individual ZAIMT sensitivities "stacked" one after the other in the order of the ZAIMTs in the array name.

    The data in the array contains N-group * block-size of values with associated statistical uncertainties.
All initial questions and comments about the changes are welcome here.


Re: 2.1.32 - Sensitivity calculation and uncertainty propagation

Posted: Thu Mar 18, 2021 12:46 am
by nicolas.martin
I was wondering if there was any publicly available covariance data file that can be used in conjunction with this new capability? Or something that is part of the Serpent distribution that I missed?

From a quick internet search, it sounds that the COVERX covariance data format comes from SCALE, and thus requires a SCALE license.
Another reference I found online is the "COMMARA 2.0" covariance data file, but I am not sure where to get it.

Thanks in advance for any pointer!

Re: 2.1.32 - Sensitivity calculation and uncertainty propagation

Posted: Thu Mar 18, 2021 4:40 pm
by Ana Jambrina
Probably, COMMARA-2.0 and COMACV1 are two of the current most used covariance data.
I might be completely off base here, but might not possible, e.g., to use NJOY through module ERRORR/COVR and PUFF-IV to obtain a covariance library?
NEA Data Bank website,, has a list of processed multigroup covariance data libraries.

Re: 2.1.32 - Sensitivity calculation and uncertainty propagation

Posted: Fri Mar 19, 2021 4:01 pm
by Ville Valtavirta
Hi Nicolas,

we don't distribute covariance data with Serpent at the moment. Generally, NJOY can be used to produce evaluated covariance data files as Ana noted. You would still need to convert those into some format supported by Serpent, e.g. the new ASCII-form.

And yes, COVERX format is the one used by SCALE and for the SCALE data you need a SCALE license.