-
Notifications
You must be signed in to change notification settings - Fork 87
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
ACER doesn't always respect the desired temperature tempd
#250
Comments
After some digging I think I know where this is coming from. NJOY uses a lot of findf calls to move back to a piece of the ENDF file. This function will scan the file forward unless it sees that it is too far down the material, and go backwards if necessary. To do this, it relies on the MAT/MF/MT part of each line on the file and I think that things go wrong there. This is what the end of the 293.6 K material for Ag109 looks like:
As we can see here, the FEND record after the last MF3 section appears twice. This is an issue that we have seen before in files where only MF3 data is linearised in RECONR. Evaluations that have MF12 data (or other data that gets linearised like MF10), does not exhibit this behaviour. I'd wager (disclaimer: not taking bets here) that every single evaluation that exhibits this temperature confusion issue will only have MF3 data linearised in RECONR. I assume that fixing the duplicate FEND record issue in RECONR will resolve the issue. |
Correction: Ag109 has MF12 data but it does not get linearised. Ag107 on the other hand gets its MF12 data linearised in RECONR. This seems to be because RECONR only linearises LO=1 data (multiplicities). LO=2 data (transition probabilities) do not get linearised in RECONR. Ag109 uses LO=2, while Ag107 is LO=1. |
Thanks for digging into this @whaeck. Sounds like it should be an easy fix, once you figure out where the bug actually is 😄 |
Interesting, but I am not waging on the actual bug, is it one? and foreseen solution. Yes some BROADR tapes have double FEND at the end of all the MF=3 temperatures they contains and this would confuse ACER? GROUPR and THERMR as well? exemplified on some reactor relevant targets for ENDF/B-VII.1 evaluations, quid for ENDF/B-VIII.0? other libraries? One must ask: why feeding ACER with a multi-temperature BROADR tape? when it can only handle one temperature at a time? I investigated the past and never used pendf tape that contains more than one temperature for ACER, GROUPR yes, Bob’s spell? and may be some reading in LA-UR-12-27079 https://mcnp.lanl.gov/pdf_files/la-ur-12-27079.pdf. Removing the duplicate FEND in the Ag109 BROADR pendf and running two ACER requesting 293.6 and 600.0 in sequence stills lead to the same temperature output, although the ace.dir files contain the requested temperature! |
This is how we generate multitemperature HDF5 libraries for OpenMC. If I want 10 temperatures, rather than running NJOY 10 times separately, I do a single run with all temperatures listed and run ACER 10 times as part of that to get 10 different ACE files (which then get combined into a single .h5 file). |
Lucky for us at LANL, we generate one temperature at a time so we never use a multi-temperature PENDF file. Regardless of this fact, this issue needs to be fixed asap in my opinion. NJOY is versatile as a tool, but sometimes the versatility leads to things like this. Anyway, I have fixed the duplicate FEND records in the PENDF files coming out of RECONR (they were indeed due to MF12 linearisation) but it has not fixed the issue. ACER still picks up the 600 K data. The fix/acer-temp contains these changes. So far I have been able to determine the following:
It seems that findf still has issues with navigating the file even after the FEND fix. I'll continue looking into this to figure out what is causing this. |
Little to do with luck, just LANL experience with NJOY. It does make sense to feed ACER with unionised MF3/MF12 mts tape, if 10 or even more temperatures are stored on the same tape this could prove challenging, it all depends when the grid union is made. @paulromano what difference do you see in looping 10 temperatures reconr-broadr (with bootstrap if you want), store the single temperature pendfs, then 10 acer (as LANL) them a single .h5 (a very efficient one) One can even think further than that, as the others MFs are temperature agnostic https://www-nds.iaea.org/Tendl2019/ could also be stored already tabulated ready for Monte Carlo sampling |
I think I fixed it. The issue arises when the PENDF tape is left at the end of the FEND record of MF3 in convr. When findf is called after that, this function will read the NEXT line before doing anything else - and that line is a MEND record. As a result, findf will read another line which would be the first line of MF1 MT451 of the NEXT material when there is only MF3 data in the PENDF file. A simple skiprz call in strategic locations solves the issue (to ensure that the tape stays on a SEND record instead of a FEND record prior to calling findf). fix/acer-temp has updated code, and a test to verify that it functions as advertised (using the input file provided by Paul Romano). |
@whaeck Just gave your |
This is now in the develop branch, which will be released soon so I'm closing the issue. |
I've run into what I believe is a bug in NJOY when generating data at multiple temperatures. When an ENDF tape (produced by BROADR) is fed into ACER, the
tempd
entry on card 8 is supposed to indicate which temperature is desired for the data written to the ACE file. However, I'm finding that for some evaluations, it seems to pick the wrong temperature. As an example, below is an input deck for processing Ag109 from ENDF/B-VII.1 at two temperatures, 293.6 K and 600 K. In the ACER section, it instructs it to use the data at 293.6 K but what ends up getting written is the data at 600 K. Note that the resulting ACE table claims the data is at 600 K, but if you compare the data to what's actually in the original reconstructed/broadened cross sections present on the ENDF tape, it is clear the data is from the wrong temperature.NJOY input deck
If I take the exact same input deck and run it on, e.g., Ag107 (with the appropriate MAT number), ACER produces the correct cross section in the resulting ACE file. I tried this same exercise on all evaluations in ENDF/B-VII.1 and found that this bug is observed for the following evaluations
Evaluations where bug is observed
I'll also mention some other things that I tried:
tempd
to pick out each temperature, the resulting ACE files actually have data at 600, 900, and 900 K respectively (so the first temperature seems to be skipped).I've put together a Jupyter notebook that produces plots comparing the cross sections in the ENDF tape produced by BROADR and corresponding ACE files so you can visually see that the cross section (MT=2) is wrong:
https://gist.github.com/paulromano/40a636d2a49f31a4382ff8a4524b53cf
The text was updated successfully, but these errors were encountered: