Skip to content

Commit

Permalink
Merge pull request #330 from njoy/feature/zaoption
Browse files Browse the repository at this point in the history
Feature/zaoption
  • Loading branch information
whaeck authored Apr 22, 2024
2 parents a446e1c + 18ecc1e commit d9a7ce7
Show file tree
Hide file tree
Showing 27 changed files with 377,694 additions and 14 deletions.
6 changes: 5 additions & 1 deletion ReleaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ Given here are some release notes for NJOY2016. Each release is made through a f
## [NJOY2016.75](https://github.com/njoy/NJOY2016/pull/xxx)
This update fixes the following issues:

In addition, this update made a small change to the NXS array for continuous energy and photonuclear ACE files (iopt = 1 and 5). In both cases, the isomeric state S, atom number Z and mass number A are now stored in NXS(9), NXS(10) and NXS(11) respectively.
In addition, this update made added the following features and changes:
- A small change to the NXS array for continuous energy and photonuclear ACE files (iopt = 1 and 5): in both cases, the isomeric state S, atom number Z and mass number A are now stored in NXS(9), NXS(10) and NXS(11) respectively.
- A new input option for acer was introduced for setting the zaid identifier of the continuous energy and photonuclear ACE files (iopt = 1 and 5):
- use za in the zaid regardless of the metastable state of the nuclide (default, this is how NJOY has always worked)
- use the metastable zaid rules (MCNP 6.3 or lower) in which we use za for ground state nuclides and use za + 300 + s * 100 for metastable nuclides (Am242 and Am242m are exceptions to this rule, for these we use 95642 and 95242 respectively)

## [NJOY2016.74](https://github.com/njoy/NJOY2016/pull/327)
This update fixes the following issues:
Expand Down
30 changes: 30 additions & 0 deletions docs/testDescription.md
Original file line number Diff line number Diff line change
Expand Up @@ -381,3 +381,33 @@ Tests 75 was added to track an issue found in ACER when multiple temperatures we
[[input](https://raw.githubusercontent.com/njoy/NJOY2016/master/tests/76/input)]

Tests 76 was added to track a few CCCCR issues. Unfortunately, these issues were related to a binary file so we cannot verify the content of the file just yet. At the very least, we now have a test to verify if CCCCR actually runs (there was previously a crash on this input).

## Test Problem 78

[[input](https://raw.githubusercontent.com/njoy/NJOY2016/master/tests/78/input)]

Tests 78 was added to track an ACER issue for heating numbers in photonuclear file. When calculating heating numbers based on ENDF LAW=2, ACER assumed that the yield of the secondary particle is always 1, which is correct in all cases except when MT5 is used as a lumped reaction.

## Test Problem 79

[[input](https://raw.githubusercontent.com/njoy/NJOY2016/master/tests/79/input)]

Tests 79 was added to track an issue in HEATR when calculating the average outgoing energy from a distribution that uses multiple interpolation ranges in TAB1 records. Mainly nuclides using MF5 instead of MF6 are impacted by this change (e.g. Sn119 and Sn122 from ENDF/B-VIII.0).

## Test Problem 80

[[input](https://raw.githubusercontent.com/njoy/NJOY2016/master/tests/80/input)]

Tests 80 was added to track an issue in LEAPR that caused an inifite loop to occur when the beta grid contains very small values.

## Test Problem 81

[[input](https://raw.githubusercontent.com/njoy/NJOY2016/master/tests/81/input)]

Tests 81 was added as a test for background R-matrix elements that were added to the ENDF/B-VIII.1 Sr88 evaluation.

## Test Problem 82

[[input](https://raw.githubusercontent.com/njoy/NJOY2016/master/tests/82/input)]

Tests 82 was added to track the new ZAID options in ACER added in NJOY2016.75.
24 changes: 17 additions & 7 deletions src/acefc.f90
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ module acefc
contains

subroutine acetop(nendf,npend,ngend,nace,ndir,iprint,itype,mcnpx,&
suff,hk,izn,awn,matd,tempd,newfor,iopp,ismooth,thin)
suff,hk,izn,awn,matd,tempd,newfor,iopp,ismooth,thin,izaoption)
!--------------------------------------------------------------------
! Prepare an ACE fast continuous file.
!--------------------------------------------------------------------
Expand All @@ -94,7 +94,7 @@ subroutine acetop(nendf,npend,ngend,nace,ndir,iprint,itype,mcnpx,&
use endf ! provides endf routines and variables
! externals
integer::nendf,npend,ngend,nace,ndir,iprint,itype,matd,newfor,iopp,ismooth,i
integer::mcnpx
integer::mcnpx,izaoption
real(kr)::suff
character(70)::hk
integer::izn(16)
Expand Down Expand Up @@ -205,7 +205,7 @@ subroutine acetop(nendf,npend,ngend,nace,ndir,iprint,itype,mcnpx,&
call atend(mscr,0)

!--load ace data into memory.
call acelod(mscr,suff,matd,tempd,newfor,mcnpx,ismooth)
call acelod(mscr,suff,matd,tempd,newfor,mcnpx,ismooth,izaoption)

!--print ace file.
if (iprint.gt.0) call aceprt(hk)
Expand Down Expand Up @@ -4887,7 +4887,7 @@ subroutine gamout(ngend,nendf,nout,nf12c,matd)
return
end subroutine gamout

subroutine acelod(nin,suff,matd,tempd,newfor,mcnpx,ismooth)
subroutine acelod(nin,suff,matd,tempd,newfor,mcnpx,ismooth,izaoption)
!-------------------------------------------------------------------
! Load data in ace format from the input file.
!-------------------------------------------------------------------
Expand All @@ -4896,7 +4896,7 @@ subroutine acelod(nin,suff,matd,tempd,newfor,mcnpx,ismooth)
use util ! repoz,dater,error,skiprz,sigfig
use endf ! provides endf routines and variables
! externals
integer::nin,matd,newfor,mcnpx,ismooth
integer::nin,matd,newfor,mcnpx,ismooth,izaoption
real(kr)::suff,tempd
! internals
integer::nwscr,nnu,nnup,kfis,mtnr,mtntr,i,nnud,nnf
Expand Down Expand Up @@ -4933,11 +4933,21 @@ subroutine acelod(nin,suff,matd,tempd,newfor,mcnpx,ismooth)
jxsd(i)=0
enddo
call repoz(nin)
iza=nint(za)
iza=izaid
aw0=awr
write(hm,'('' mat'',i4)') matd
tz=tempd*bk/emev
zaid=iza+suff
zaid=izaid+suff
if (izaoption.eq.1.and.is.gt.0) then
zaid=izaid+300+100*is+suff
endif
if (izaoption.eq.1.and.izaid.eq.95242) then
if (is.eq.0) then
zaid=izaid+400+suff
elseif (is.eq.1) then
zaid=izaid+suff
endif
endif
if (mcnpx.eq.0) then
if (izai.eq.1) then
write(hz,'(f9.2,''c'')') zaid
Expand Down
14 changes: 12 additions & 2 deletions src/acepn.f90
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module acepn
contains

subroutine acephn(nendf,npend,nace,ndir,matd,tempd,iprint,mcnpx,&
ityp,suff,hk,izn,awn)
ityp,suff,hk,izn,awn,izaoption)
!-------------------------------------------------------------------
! Prepare ACE photo-nuclear files.
!-------------------------------------------------------------------
Expand All @@ -36,7 +36,7 @@ subroutine acephn(nendf,npend,nace,ndir,matd,tempd,iprint,mcnpx,&
use endf ! provides endf routines and variables
use acecm ! provides bachaa,eavl,ptleg2,pttab2
! externals
integer::nendf,npend,nace,ndir,matd,iprint,mcnpx,ityp
integer::nendf,npend,nace,ndir,matd,iprint,mcnpx,ityp,izaoption
real(kr)::tempd,suff
integer::izn(16)
real(kr)::awn(16)
Expand Down Expand Up @@ -1825,6 +1825,16 @@ subroutine acephn(nendf,npend,nace,ndir,matd,tempd,iprint,mcnpx,&

!--print and write the photonuclear file
zaid=za+suff
if (izaoption.eq.1.and.is.gt.0) then
zaid=za+300+100*is+suff
endif
if (izaoption.eq.1.and.za.eq.95242) then
if (is.eq.0) then
zaid=za+400+suff
elseif (is.eq.1) then
zaid=za+suff
endif
endif
if (mcnpx.eq.0) then
write(hz,'(f9.2,''u'')') zaid
else
Expand Down
25 changes: 21 additions & 4 deletions src/acer.f90
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,17 @@ subroutine acer
! itype ace output type (1, 2, or 3, default=1)
! suff id suffix for zaid (default=.00)
! nxtra number of iz,aw pairs to read in (default=0)
! izaopt the zaid option
! 0 use za in the zaid regardless of the metastable state
! of the nuclide (default)
! 1 use the metastable zaid rules (MCNP 6.3 or lower):
! - use za for ground state nuclides
! - use za + 300 + s * 100 for metastable
! nuclides
! Am242 and Am242m are exceptions to this rule, for
! these we use 95642 and 95242 respectively
! this option only affects fast and photonuclear files when
! they are created by acer (iopt = 1 and iopt = 5)
! card 3
! hk descriptive character string (70 char max)
! delimited by quotes
Expand Down Expand Up @@ -235,7 +246,7 @@ subroutine acer

! internals
integer::nendf,npend,ngend,nace,ndir
integer::iopt,iprint,itype,nxtra,nza
integer::iopt,iprint,itype,nxtra,nza,izaoption
integer::matd
real(kr)::tempd
integer::newfor,iopp,ismooth
Expand Down Expand Up @@ -280,7 +291,8 @@ subroutine acer
itype=1
suff=0
nxtra=0
read(nsysi,*) iopt,iprint,itype,suff,nxtra
izaoption=0
read(nsysi,*) iopt,iprint,itype,suff,nxtra,izaoption
mcnpx=0
if (iopt.lt.0) then
mcnpx=1
Expand Down Expand Up @@ -327,10 +339,15 @@ subroutine acer
if (ismooth.ne.0.and.ismooth.ne.1) then
call error('acer','illegal ismooth.',' ')
endif
if (izaoption.ne.0.and.izaoption.ne.1) then
call error('acer','illegal izaopt.',' ')
endif
if (iopp.eq.0) write(nsyso,&
'(/'' photons will not be processed'')')
if (ismooth.eq.0) write(nsyso,&
'(/'' smoothing operation will not be performed'')')
if (izaoption.eq.1) write(nsyso,&
'(/'' zaids will be formatted using the metastable za rules'')')
mte=0
z(1)=0
z(2)=0
Expand Down Expand Up @@ -442,7 +459,7 @@ subroutine acer
!--prepare fast ace data
if (iopt.eq.1) then
call acetop(nendf,npend,ngend,nace,ndir,iprint,itype,mcnpx,suff,&
hk,izn,awn,matd,tempd,newfor,iopp,ismooth,thin)
hk,izn,awn,matd,tempd,newfor,iopp,ismooth,thin,izaoption)

!--prepare thermal ace data
else if (iopt.eq.2) then
Expand All @@ -462,7 +479,7 @@ subroutine acer
!--prepare photo-nuclear data
else if (iopt.eq.5) then
call acephn(nendf,npend,nace,ndir,matd,tempd,iprint,&
mcnpx,itype,suff,hk,izn,awn)
mcnpx,itype,suff,hk,izn,awn,izaoption)

!--print or edit ace files
else if (iopt.ge.7.and.iopt.le.8) then
Expand Down
51 changes: 51 additions & 0 deletions tests/82/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/input"
"${CMAKE_CURRENT_BINARY_DIR}/input" COPYONLY )

configure_file("${CMAKE_CURRENT_SOURCE_DIR}/referenceTape26"
"${CMAKE_CURRENT_BINARY_DIR}/referenceTape26" COPYONLY )
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/referenceTape27"
"${CMAKE_CURRENT_BINARY_DIR}/referenceTape27" COPYONLY )
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/referenceTape28"
"${CMAKE_CURRENT_BINARY_DIR}/referenceTape28" COPYONLY )
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/referenceTape29"
"${CMAKE_CURRENT_BINARY_DIR}/referenceTape29" COPYONLY )

configure_file("${CMAKE_CURRENT_SOURCE_DIR}/referenceTape36"
"${CMAKE_CURRENT_BINARY_DIR}/referenceTape36" COPYONLY )
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/referenceTape37"
"${CMAKE_CURRENT_BINARY_DIR}/referenceTape37" COPYONLY )
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/referenceTape38"
"${CMAKE_CURRENT_BINARY_DIR}/referenceTape38" COPYONLY )
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/referenceTape39"
"${CMAKE_CURRENT_BINARY_DIR}/referenceTape39" COPYONLY )

configure_file("${CMAKE_CURRENT_SOURCE_DIR}/referenceTape46"
"${CMAKE_CURRENT_BINARY_DIR}/referenceTape46" COPYONLY )
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/referenceTape47"
"${CMAKE_CURRENT_BINARY_DIR}/referenceTape47" COPYONLY )
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/referenceTape48"
"${CMAKE_CURRENT_BINARY_DIR}/referenceTape48" COPYONLY )
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/referenceTape49"
"${CMAKE_CURRENT_BINARY_DIR}/referenceTape49" COPYONLY )

configure_file("${CMAKE_CURRENT_SOURCE_DIR}/referenceTape56"
"${CMAKE_CURRENT_BINARY_DIR}/referenceTape56" COPYONLY )
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/referenceTape57"
"${CMAKE_CURRENT_BINARY_DIR}/referenceTape57" COPYONLY )
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/referenceTape58"
"${CMAKE_CURRENT_BINARY_DIR}/referenceTape58" COPYONLY )
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/referenceTape59"
"${CMAKE_CURRENT_BINARY_DIR}/referenceTape59" COPYONLY )

configure_file("${RESOURCES}/n-027_Co_058-ENDF8.0.endf"
"${CMAKE_CURRENT_BINARY_DIR}/tape20" COPYONLY )
configure_file("${RESOURCES}/n-027_Co_058m1-ENDF8.0.endf"
"${CMAKE_CURRENT_BINARY_DIR}/tape30" COPYONLY )
configure_file("${RESOURCES}/n-095_Am_242-ENDF8.0.endf"
"${CMAKE_CURRENT_BINARY_DIR}/tape40" COPYONLY )
configure_file("${RESOURCES}/n-095_Am_242m1-ENDF8.0.endf"
"${CMAKE_CURRENT_BINARY_DIR}/tape50" COPYONLY )

add_test( NAME "Test82"
COMMAND ${Python3_EXECUTABLE} "../execute.py"
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" )
117 changes: 117 additions & 0 deletions tests/82/input
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
-- - - - - - - - - - - - - - - - - - - - - - - - - -
reconr
20 21
'Co58'/
2722 /
0.001/
0/
broadr
20 21 22
2722 1 0 0 0. /
0.001/
293.6 /
0/
-- Co58 izaopt=0 -> zaid = 27058.01c
acer
20 22 0 26 27
1 0 1 .01 0 0 /
'Co58 izaopt=0 -> zaid = 27058.01c'/
2722 293.6
1 1/
/
-- Co58 izaopt=1 -> zaid = 27058.01c
acer
20 22 0 28 29
1 0 1 .01 0 1 /
'Co58 izaopt=1 -> zaid = 27058.01c'/
2722 293.6
1 1/
/
-- - - - - - - - - - - - - - - - - - - - - - - - - -
reconr
30 21
'Co58m1'/
2723 /
0.001/
0/
broadr
30 21 22
2723 1 0 0 0. /
0.001/
293.6 /
0/
-- Co58m1 izaopt=0 -> zaid = 27058.01c
acer
30 22 0 36 37
1 0 1 .01 0 0 /
'Co58m1 izaopt=0 -> zaid = 27058.01c'/
2723 293.6
1 1/
/
-- Co58m1 izaopt=1 -> zaid = 27458.01c
acer
30 22 0 38 39
1 0 1 .01 0 1 /
'Co58m1 izaopt=1 -> zaid = 27458.01c'/
2723 293.6
1 1/
/
-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
reconr
40 21
'Am242'/
9546 /
0.001/
0/
broadr
40 21 22
9546 1 0 0 0. /
0.001/
293.6 /
0/
-- Am242 izaopt=0 -> zaid = 95242.01c
acer
40 22 0 46 47
1 0 1 .01 0 0 /
'Am242 izaopt=0 -> zaid = 95242.01c'/
9546 293.6
1 1/
/
-- Am242 izaopt=1 -> zaid = 95642.01c
acer
40 22 0 48 49
1 0 1 .01 0 1 /
'Am242 izaopt=1 -> zaid = 95642.01c'/
9546 293.6
1 1/
/
-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
reconr
50 21
'Am242m1'/
9547 /
0.001/
0/
broadr
50 21 22
9547 1 0 0 0. /
0.001/
293.6 /
0/
-- Am242m1 izaopt=0 -> zaid = 95242.01c
acer
50 22 0 56 57
1 0 1 .01 0 0 /
'Am242m1 izaopt=0 -> zaid = 95242.01c'/
9547 293.6
1 1/
/
-- Am242m1 izaopt=1 -> zaid = 95242.01c
acer
50 22 0 58 59
1 0 1 .01 0 1 /
'Am242m1 izaopt=1 -> zaid = 95242.01c'/
9547 293.6
1 1/
/
stop
Loading

0 comments on commit d9a7ce7

Please sign in to comment.