-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUG Sensitivity order error with realist card #487
Comments
@GrimFe thanks for bringing this up. Seems quite strange indeed. Looking at your comment
I think this could be source of the problem. I would need to check, but we may assume the numbers always increase and take the index position just based on the position of the variable name in that line |
@GrimFe can you provide the Serpent version you're using to generate these files? The sensitivity file in our test suite has the xs perturbation indices on different lines % Indices for different perturbations:
iSENS_PERT_TOT_XS = 1;
iSENS_PERT_ELA_XS = 2;
iSENS_PERT_SAB_XS = 3;
iSENS_PERT_INL_XS = 4;
iSENS_PERT_CAPT_XS = 5;
iSENS_PERT_FISS_XS = 6;
iSENS_PERT_NXN_XS = 7; and the other weird thing is we don't to any direction actions on these index parameters either. Instead, we use the SENS_PERT_LIST = [
'total xs '
'ela scatt xs '
'sab scatt xs '
'inl scatt xs '
'capture xs '
'fission xs '
'nxn xs '
]; Is there anything strange in that array in your outputs? |
Hi @drewejohnson, I am using Serpent 2.2.0 Here is what I have copy-pasted from my output
Apparently, no matter what I set ( I hope this helps to find where the issue is and maybe clarifies my previous message. |
Thanks @GrimFe SENS_PERT_LIST = [
'total xs '
'ela scatt xs '
'inl scatt xs '
'capture xs '
'fission xs '
];
% Indices for different perturbations:
iSENS_PERT_TOT_XS = 1;
iSENS_PERT_ELA_XS = 5;
iSENS_PERT_INL_XS = 4;
iSENS_PERT_CAPT_XS = 3;
iSENS_PERT_FISS_XS = 2; and SENS_PERT_LIST = [
'total xs '
'capture xs '
'fission xs '
];
% Indices for different perturbations:
iSENS_PERT_TOT_XS = 1;
iSENS_PERT_CAPT_XS = 3;
iSENS_PERT_FISS_XS = 2; Feel like Serpent bugs. But the other
I agree. Are you able to post this to the Serpent forum? |
I have the same problem: The results are obtained with
relevant Serpent input:
relevant Serpent output (*_sens0.m file):
As evident the ordering of the reactions given in SENS_PERT_LIST does not correspond to the indices given in iSENS_PERT_* It appears that the Parser of serpentTools is inferring the index from the SENS_PERT_LIST by assuming the index always increases, as you mentioned above and is not taking the indices from the iSENS_PERT_* values. If the iSENS_PERT_* values would be taken instead, the parsed values would be fine (at least for the example, I am calculating above). Thank you :-) |
Summary of issue
I run sensitivity calculations on the Jezebel model willing to perturb the fission and capture cross section of U235.
I run four calculations, perturbing the reactions, two using the
mtlist
card (sens pert xs mtlist 18 102
andsens pert xs mtlist 102 18
) and two using therealist
card (sens pert xs realist capt fiss
andsens pert xs realist fiss capt
). The four cases will be respectively named 'A', 'B', 'C' and 'D' in the following.The sensitivity profiles processed with serpentTools are positive for fission and negative for capture in cases A, B, C and viceversa in case D.
Code for reproducing the issue
sts.read("mt_18_102.i_sens0.m").plot("keff")
sts.read("mt_102_18.i_sens0.m").plot("keff")
sts.read("rea_f_c.i_sens0.m").plot("keff")
sts.read("rea_c_f.i_sens0.m").plot("keff")
Actual outcome including console output and error traceback if applicable
A:
B:
C:
D:
Expected outcome
The four plots should be the same.
Versions
Please provide the following:
serpentTools.__version__
: '0.9.4'python --version
: 3.10.8Additional comments
The text was updated successfully, but these errors were encountered: