Covlib output question

Questions and discussion about applications, input, output and general user topics
Post Reply
Andy Rivas
Posts: 10
Joined: Thu May 27, 2021 8:13 pm
Security question 1: No
Security question 2: 7

Covlib output question

Post by Andy Rivas » Thu May 27, 2021 8:34 pm

Hello,

I had a question on the SERPENT output when using "set covlib" to calculate keff uncertainty due to nuclear data. I see that the SERPENT *_sens0.m output file provides sensitivity vectors (KEFF_S) and uncertainty vectors (KEFF_SCOV), as well as commented vectors titled "Uncertainty from nuclear data covariancesKEFF_COV_DATA_UNCERTAINTY" and "Variance from nuclear data covariancesKEFF_COV_DATA_VARIANCE". My assumption was that these commented vectors contained the reaction wise variance and uncertainty calculated by SERPENT using the sandwich rule (S^T*COV*S), but I was unable to match the values when performing the calculation independently using a python script, even though I was able to perfectly replicate the sensitivity vectors (KEFF_S) and uncertainty vectors (KEFF_SCOV). Even when taking the square root element wise of the "Variance from nuclear data covariancesKEFF_COV_DATA_VARIANCE" vector, I do not get the same values in the "Uncertainty from nuclear data covariancesKEFF_COV_DATA_UNCERTAINTY" vector. My question is what do the values in the commented vectors titled "Uncertainty from nuclear data covariancesKEFF_COV_DATA_UNCERTAINTY" and "Variance from nuclear data covariancesKEFF_COV_DATA_VARIANCE" mean and how are they calculated? These two vectors in my output file are shown below. Thank you for your help!

% Uncertainty from nuclear data covariancesKEFF_COV_DATA_UNCERTAINTY = [ 1.09786E-02 2.9E-02 1.20951E-04 2.5E-02 4.50829E-04 4.7E-02 1.26863E-03 7.7E-02 2.50064E-05 2.1E-01 1.74993E-04 2.7E-02 5.48588E-04 4.7E-02 1.04246E-04 2.4E-02 2.63765E-05 5.2E-02 2.71816E-05 1.3E-01 0.00000E+00 0.0E+00 2.01333E-05 1.8E-01 7.22597E-06 2.9E-01 1.03686E-06 2.6E-01 1.97641E-05 7.5E-02 6.07367E-05 4.5E-02 3.53012E-04 6.1E-02 2.14423E-04 6.4E-02 1.40839E-06 3.8E-01 7.72959E-05 7.4E-02 2.10986E-04 5.0E-02 1.88288E-03 2.4E-02 8.27808E-04 2.4E-02 5.13092E-04 2.3E-02 1.14095E-04 6.1E-02 3.89707E-05 6.9E-02 2.46013E-07 7.2E-01 4.66942E-05 9.6E-02 3.19979E-05 9.2E-02 1.41221E-04 6.2E-02 6.40069E-05 7.0E-02 0.00000E+00 0.0E+00 2.89917E-06 2.6E-01 1.31522E-04 6.6E-02 7.39778E-05 6.7E-02 0.00000E+00 0.0E+00 5.30463E-05 7.4E-02 2.10504E-04 6.6E-02 4.31178E-05 6.1E-02 0.00000E+00 0.0E+00 2.26778E-05 1.1E-01 1.41617E-04 6.6E-02 2.86006E-05 9.6E-02 0.00000E+00 0.0E+00 1.34116E-05 1.5E-01 1.99471E-04 5.5E-02 2.55111E-05 8.1E-02 0.00000E+00 0.0E+00 1.90110E-05 1.7E-01 2.36202E-04 5.5E-02 6.05413E-05 6.0E-02 2.01284E-07 8.7E-01 1.65274E-05 1.1E-01 5.34897E-04 4.4E-02 1.70169E-05 1.0E+00 0.00000E+00 0.0E+00 5.22500E-04 5.6E-02 4.50045E-07 9.4E-01 4.63503E-04 7.3E-02 -2.69761E-05 1.0E+00 1.90318E-05 2.3E-01 2.05763E-06 8.8E-01 2.69666E-04 2.3E-02 2.28872E-05 1.2E-01 -2.91354E-06 1.0E+00 2.94922E-03 2.4E-02 -4.25294E-05 1.0E+00 3.15857E-04 4.3E-02 2.81130E-05 1.7E-01 9.60497E-07 1.0E+00 7.49531E-04 2.8E-02 1.27381E-06 2.3E-01 1.04903E-05 1.0E+00 1.44630E-03 2.9E-02 -1.44171E-05 1.0E+00 1.17801E-03 4.5E-02 2.27841E-04 7.3E-01 2.43940E-03 5.5E-02 7.01938E-03 3.9E-02 -6.62868E-04 7.5E-01 1.42931E-04 7.7E-02 -2.13650E-05 6.0E-01 1.40505E-04 5.0E-02 1.59705E-06 7.0E-01 2.09186E-06 9.3E-01 1.98897E-03 2.1E-02 -1.02808E-05 1.0E+00 2.50258E-03 5.2E-02 1.32213E-03 6.7E-02 3.82435E-04 6.5E-01 5.52902E-07 1.0E+00 9.10155E-06 1.0E+00 -6.78051E-06 1.0E+00 3.36789E-03 6.5E-02 4.15700E-05 1.2E-01 1.50041E-03 2.1E-02 -5.25020E-05 3.2E-02 2.95484E-03 2.2E-02 2.64527E-05 1.6E-01 1.63884E-07 1.0E+00 1.09710E-04 6.8E-02 1.76417E-05 7.3E-01 0.00000E+00 0.0E+00 -3.67554E-07 1.0E+00 1.99948E-04 7.7E-02 0.00000E+00 0.0E+00 2.64093E-05 7.0E-02 2.33831E-05 1.8E-01 0.00000E+00 0.0E+00 3.31353E-07 1.0E+00 0.00000E+00 0.0E+00 4.18608E-05 5.0E-02 9.99444E-06 1.7E-01 5.20141E-08 1.0E+00 9.28505E-08 1.0E+00 7.24020E-05 4.9E-02 -2.50036E-07 1.0E+00 4.74882E-06 1.3E-01 8.85882E-05 4.8E-02 -1.98048E-07 1.0E+00 5.49043E-06 1.6E-01 5.53687E-05 6.0E-02 4.91057E-08 1.0E+00 8.55194E-06 1.3E-01 5.95766E-05 5.2E-02 -8.11657E-07 4.9E-01 2.42871E-06 1.5E-01 ];

% Variance from nuclear data covariancesKEFF_COV_DATA_VARIANCE = [ 1.30396E-04 4.7E-02 1.55396E-08 3.1E-02 2.47757E-07 8.7E-02 2.56592E-06 1.6E-01 3.33455E-09 3.5E-01 3.28996E-08 4.1E-02 3.67533E-07 8.8E-02 1.14737E-08 2.6E-02 8.81721E-10 9.0E-02 1.92587E-09 2.3E-01 0.00000E+00 0.0E+00 1.70072E-09 2.7E-01 4.82806E-10 5.5E-01 8.32619E-12 3.4E-01 6.06523E-10 1.4E-01 4.44346E-09 8.1E-02 1.70800E-07 1.3E-01 6.44074E-08 1.2E-01 3.09807E-11 5.2E-01 9.17692E-09 1.6E-01 5.54220E-08 9.0E-02 3.74822E-06 2.7E-02 7.23632E-07 2.6E-02 2.77248E-07 2.3E-02 1.78843E-08 1.4E-01 2.22428E-09 1.3E-01 3.13084E-12 7.5E-01 4.15072E-09 1.6E-01 1.88235E-09 1.9E-01 2.75173E-08 1.2E-01 6.06274E-09 1.3E-01 0.00000E+00 0.0E+00 6.37557E-11 4.3E-01 2.48064E-08 1.2E-01 7.90248E-09 1.6E-01 0.00000E+00 0.0E+00 4.33524E-09 1.4E-01 6.36834E-08 1.4E-01 2.55190E-09 1.2E-01 0.00000E+00 0.0E+00 1.10386E-09 1.8E-01 2.87020E-08 1.3E-01 1.56752E-09 2.2E-01 0.00000E+00 0.0E+00 5.99283E-10 2.3E-01 5.17469E-08 9.9E-02 1.07008E-09 1.4E-01 0.00000E+00 0.0E+00 1.36161E-09 2.6E-01 7.23847E-08 1.0E-01 4.99209E-09 1.1E-01 3.05862E-12 9.7E-01 5.71459E-10 2.0E-01 3.40819E-07 8.2E-02 -7.99653E-09 1.0E+00 0.00000E+00 0.0E+00 3.58976E-07 1.0E-01 1.78814E-11 1.0E+00 3.26774E-07 1.3E-01 -1.72933E-08 1.0E+00 2.32037E-09 5.6E-01 2.70675E-10 9.3E-01 7.64774E-08 2.9E-02 9.78496E-10 1.6E-01 -1.02207E-10 1.0E+00 9.20331E-06 3.3E-02 -9.63485E-09 1.0E+00 1.18253E-07 7.4E-02 3.18334E-09 3.2E-01 -9.76513E-11 1.0E+00 6.04174E-07 4.1E-02 5.56644E-12 3.4E-01 6.57300E-10 1.0E+00 2.26926E-06 4.8E-02 -2.12276E-09 1.0E+00 1.66845E-06 8.8E-02 6.75979E-07 5.9E-01 7.72988E-06 1.0E-01 5.66717E-05 6.6E-02 -1.79358E-06 1.0E+00 3.23259E-08 1.4E-01 -3.59283E-09 7.6E-01 2.45616E-08 1.6E-01 8.96340E-11 8.4E-01 4.00596E-11 1.0E+00 4.13081E-06 2.3E-02 -3.67039E-09 1.0E+00 7.95696E-06 1.1E-01 2.51428E-06 1.4E-01 1.21068E-06 8.1E-01 1.04451E-10 1.0E+00 2.07476E-09 1.0E+00 -1.31617E-08 1.0E+00 1.60767E-05 1.2E-01 4.12200E-09 2.3E-01 2.34775E-06 2.2E-02 -3.03237E-09 5.5E-02 9.15014E-06 2.6E-02 2.43695E-09 3.8E-01 -3.37287E-12 1.0E+00 1.75331E-08 1.2E-01 2.82460E-09 1.0E+00 0.00000E+00 0.0E+00 3.71170E-13 1.0E+00 6.36671E-08 1.4E-01 0.00000E+00 0.0E+00 1.04020E-09 1.4E-01 2.30773E-09 2.8E-01 0.00000E+00 0.0E+00 5.56650E-11 1.0E+00 0.00000E+00 0.0E+00 2.18885E-09 9.8E-02 3.95566E-10 2.6E-01 2.70547E-13 1.0E+00 8.62122E-13 1.0E+00 6.48979E-09 9.0E-02 -1.62571E-12 1.0E+00 5.86994E-11 2.3E-01 9.63976E-09 9.0E-02 -3.34867E-12 1.0E+00 1.04909E-10 3.1E-01 4.14210E-09 1.3E-01 2.60004E-12 1.0E+00 1.92884E-10 2.0E-01 4.51465E-09 1.1E-01 -5.60415E-12 6.5E-01 1.89479E-11 2.6E-01 ];


I also wanted to ask if there was anyway that the stochastic uncertainty of the sensitivity coefficients can be propagated to keff so that after applying the sandwich rule I get a stochastic uncertainty to the sandwich rule uncertainty, i.e. Keff +/- (X% +/- Y%), where X is the uncertainty due to nuclear data and Y is the stochastic uncertainty? I know that SERPENT provides this, but is there a way to calculate this external to SERPENT? Thank you!

Ana Jambrina
Posts: 553
Joined: Tue May 26, 2020 5:32 pm
Security question 1: No
Security question 2: 7

Re: Covlib output question

Post by Ana Jambrina » Thu May 27, 2021 10:38 pm

Serpent applies the sandwich rule using the calculated sensitivity vectors and propagates the covariance data to uncertainties of the sensitivity responses (see 'collectuncresults.c' routine).

KEFF_COV_DATA_UNCERTAINTY = sqrt(S * COV * S^T)
KEFF_COV_DATA_VARIANCE = S * COV * S^T

printing out mean and relative error total and for each block. The relative error calculation follows the same procedure for all the parameters in Serpent. To be able to evaluate it outside Serpent, you would need to extract each of the terms involved in the calculation for the given parameter (see 'relerr.c' routine).

Which Serpent version are you running? Serpent 2.1.32 includes some modifications related to the treatment of negative uncertainties due to non-PSD covariance matrix (see post: viewtopic.php?f=23&t=3686).
- Ana

Andy Rivas
Posts: 10
Joined: Thu May 27, 2021 8:13 pm
Security question 1: No
Security question 2: 7

Re: Covlib output question

Post by Andy Rivas » Thu May 27, 2021 11:50 pm

Hi Ana,

Thank you for answering my questions and I will take a look at those routines. I was using SERPENT 2.1.31 but from the post you linked I should be using 2.1.32. I will use the more recent version of SERPENT and rerun my cases to see if I have the results match with my script calculations. Thank you so much again!

-Andy

Post Reply