Skip to content

Commit e6edfd6

Browse files
authored
Merge pull request #391 from njoy/fix/endf81-primary-capture-gammas
ENDF/B-VIII.1 Discrete primary gamma format discrepancy handling in ACER
2 parents 009183c + b51ec8e commit e6edfd6

7 files changed

Lines changed: 331380 additions & 6 deletions

File tree

ReleaseNotes.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@ Given here are some release notes for NJOY2016. Each release is made through a f
55
This update fixes the following issues:
66
- GROUPR output now correctly distinguishes between level numbers and isomeric numbers when extracting nuclide production.
77
- LEAPR now sets the EMAX value in MF1 MT451 to be equal to the B(4) value in MF7 MT4.
8+
- PURR now uses quicksort instead of bubble sort, which leads to a significant speedup in this module. This change should have no effect on the values of the probability table.
9+
- ACER now correctly handles discrete primary gammas in File 6 for the ENDF/B-VIII.1 release, which uses a different format than JEFF and JENDL libraries.
810

911
In addition, this update added the following features and changes:
1012
- Added optional card9a to GROUPR to support extracting MF=9 and MF=10 production channels with resulting level numbers greater than 9.
11-
12-
The cmake files were simplified to allow for the use of LLVM's flang compiler. A minor update was mode to GROUPR as well to allow for compilation with LLVM flang.
13+
- Two group structures were added to GROUPR (the apollo 99-group structure and the ecco 1962-group structure). The shem epm 295-group structure and shem cea/epm 361-group structure were updated as well.
1314

1415
## [NJOY2016.78](https://github.com/njoy/NJOY2016/pull/361)
1516
This update fixes the following issues:

src/acefc.f90

Lines changed: 61 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ module acefc
4545
integer::mt103,mt104,mt105,mt106,mt107
4646
integer::mpmin,mpmax,mdmin,mdmax,mtmin,mtmax,m3min,m3max,m4min,m4max
4747

48+
!-- adding variables to hold the library and version
49+
integer::nlib,lrel,nver
50+
4851
! record parameters for Type-2 binary files
4952
integer::ner,nbw
5053

@@ -152,6 +155,9 @@ subroutine acetop(nendf,npend,ngend,nace,ndir,iprint,itype,mcnpx,&
152155
call repoz(nendf)
153156
call tpidio(nendf,0,0,b,nb,nw)
154157
call contio(nendf,0,0,b,nb,nw)
158+
!-- get library
159+
nlib = n1h
160+
155161
call contio(nendf,0,0,b,nb,nw)
156162
if (n1h.ne.0) then
157163
iverf=4
@@ -162,6 +168,11 @@ subroutine acetop(nendf,npend,ngend,nace,ndir,iprint,itype,mcnpx,&
162168
endif
163169
write(nsyso,'(/'' using endf-'',i1,'' format'')') iverf
164170

171+
!-- get library release
172+
call contio(nendf,0,0,b,nb,nw)
173+
lrel = l1h
174+
nver=n2h
175+
165176
!--assign scratch files
166177
mscr=10
167178
mscr=iabs(mscr)
@@ -8669,6 +8680,25 @@ subroutine acelpp(next,matd,ngmt,nin)
86698680
'reset to 1.e-5 eV')
86708681
ep=1.e-5_kr
86718682
endif
8683+
!-- ENDF-8.1 formats primary gamma energy as the outgoing
8684+
!-- energy at each incident energy. JENDL (and JEFF) format
8685+
!-- them as the binding energy. NJOY expects the binding
8686+
!-- energy so this logic changes the value if the evaluation
8687+
!-- is from ENDF-8.1. This will hopefully be resolved before
8688+
!-- the next ENDF release.
8689+
if (law.eq.1.and.ep.lt.zero) then
8690+
if (nlib.eq.0.and.nver.eq.8.and.lrel.eq.1) then
8691+
!-- convert to the (negated) binding energy value
8692+
ep=ep+ei*awr/(awr+1)
8693+
call mess('acelpp',&
8694+
'Handling MF6 ENDF-8.1 discrete primary gamma ',&
8695+
'format by converting to JENDL format')
8696+
else
8697+
call mess('acelpp',&
8698+
'Handling MF6 discrete primary gammas by ',&
8699+
'assuming the JENDL-5.0 format.')
8700+
endif
8701+
endif
86728702
if (law.eq.2) ep=ep-awr*ei/(awr+1)
86738703
dise(ki)=ep
86748704
if (ki.gt.1) then
@@ -8691,6 +8721,18 @@ subroutine acelpp(next,matd,ngmt,nin)
86918721
'reset to 1.e-5 eV')
86928722
ep=1.e-5_kr
86938723
endif
8724+
!-- ENDF-8.1 formats primary gamma energy as the outgoing
8725+
!-- energy at each incident energy. JENDL (and JEFF) format
8726+
!-- them as the binding energy. NJOY expects the binding
8727+
!-- energy so this logic changes the value if the evaluation
8728+
!-- is from ENDF-8.1. This will hopefully be resolved before
8729+
!-- the next ENDF release
8730+
if (law.eq.1.and.ep.lt.zero) then
8731+
if (nlib.eq.0.and.nver.eq.8.and.lrel.eq.1) then
8732+
!-- convert to the (negated) binding energy value
8733+
ep=ep+ei*awr/(awr+1)
8734+
endif
8735+
endif
86948736
if (law.eq.2) ep=ep-awr*ei/(awr+1)
86958737
if (ki.gt.1.) then
86968738
if (ep.eq.scr(5+2*(ki-1)))&
@@ -8703,7 +8745,7 @@ subroutine acelpp(next,matd,ngmt,nin)
87038745
!--found a new discrete energy. insert it into
87048746
!--the existing dise array, making sure to
87058747
!--maintain a highest to lowest energy order.
8706-
if (abs(scr(5+2*ki)).gt.abs(dise(1))) then
8748+
if (abs(ep).gt.abs(dise(1))) then
87078749
do m=nd0,1,-1
87088750
dise(m+1)=dise(m)
87098751
enddo
@@ -8827,8 +8869,15 @@ subroutine acelpp(next,matd,ngmt,nin)
88278869
!--photon.
88288870
if (nd0.ne.0.and.nd.eq.nd0) then
88298871
do nn=1,nd
8830-
if (law.eq.1.and.scr(5+2*nn).lt.zero)&
8831-
scr(5+2*nn)=-scr(5+2*nn)+ei*awr/(awr+1)
8872+
if (law.eq.1.and.scr(5+2*nn).lt.zero) then
8873+
!-- if ENDF8.1, don't need to convert to gamma energy
8874+
!-- from binding energy - just negate
8875+
if (nlib.eq.0.and.nver.eq.8.and.lrel.eq.1) then
8876+
scr(5+2*nn)=-scr(5+2*nn)
8877+
else
8878+
scr(5+2*nn)=-scr(5+2*nn)+ei*awr/(awr+1)
8879+
endif
8880+
endif
88328881
enddo
88338882
elseif (nd0.ne.0.and.nd.ne.nd0) then
88348883
!--if nd=0 then must insert all discrete photons
@@ -8865,7 +8914,15 @@ subroutine acelpp(next,matd,ngmt,nin)
88658914
!--to account for the incident neutron energy.
88668915
do m=nd0,1,-1
88678916
ep=dise(m)
8868-
if (law.eq.1.and.ep.lt.zero)ep=-ep+ei*awr/(awr+1)
8917+
if (law.eq.1.and.ep.lt.zero) then
8918+
!-- if ENDF8.1, don't need to convert to gamma energy
8919+
!-- from binding energy - just negate
8920+
if (nlib.eq.0.and.nver.eq.8.and.lrel.eq.1) then
8921+
ep=-ep
8922+
else
8923+
ep=-ep+ei*awr/(awr+1)
8924+
endif
8925+
endif
88698926
if (law.eq.2)ep=ep+ei*awr/(awr+1)
88708927
scr(5+2*m)=ep
88718928
scr(6+2*m)=zero

tests/87/CMakeLists.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/input"
2+
"${CMAKE_CURRENT_BINARY_DIR}/input" COPYONLY )
3+
4+
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/referenceTape41"
5+
"${CMAKE_CURRENT_BINARY_DIR}/referenceTape41" COPYONLY )
6+
7+
configure_file("${RESOURCES}/n-078_Pt_190-ENDF8.1.endf"
8+
"${CMAKE_CURRENT_BINARY_DIR}/tape20" COPYONLY )
9+
10+
add_test( NAME "Test87"
11+
COMMAND ${Python3_EXECUTABLE} "../execute.py"
12+
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" )

tests/87/input

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
-- n-078_Pt_190_converted ACE file
2+
moder
3+
20 -21
4+
reconr
5+
-21 -22/
6+
'reconr/pendf tape for ENDF81 Pt190'/
7+
7825 0/
8+
.001/
9+
0 /
10+
broadr
11+
-21 -22 -23/
12+
7825 1 0 0/
13+
.001/
14+
293.6/
15+
0/
16+
purr
17+
-21 -23 -24/
18+
7825 1 1 20 4 1 2/
19+
293.6 /
20+
1.e10 /
21+
0/
22+
moder
23+
-24 34
24+
acer
25+
-21 -24 0 41 42
26+
1 0 1 .10 /
27+
'fast acer tape for n-078_Pt_190_converted' /
28+
7825 293.6 /
29+
/
30+
/
31+
stop

0 commit comments

Comments
 (0)