Skip to content

Commit

Permalink
Merge pull request #226 from njoy/develop
Browse files Browse the repository at this point in the history
NJOY2016.66
  • Loading branch information
whaeck authored Mar 10, 2022
2 parents 17425cf + 4735d1e commit b0ffb23
Show file tree
Hide file tree
Showing 88 changed files with 3,614,298 additions and 19,682 deletions.
21 changes: 21 additions & 0 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,27 @@
# Release Notes—NJOY2016
Given here are some release notes for NJOY2016. Each release is made through a formal [Pull Request](https://github.com/njoy/NJOY2016/pulls) made on GitHub. There are links in this document that point to each of those Pull Requests, where you can see in great details the changes that were made. Often the Pull Requests are made in response to an [issue](https://github.com/njoy/NJOY2016/issues). In such cases, links to those issues are also given.

## [NJOY2016.66](https://github.com/njoy/NJOY2016/pull/xxx)
This constitutes a major update of NJOY to accommodate the latest IAEA photonuclear data library (which uses non-isotropic photon distributions) and the mixed mode elastic scattering ENDF format (adopted in the ENDF format in November 2020).

The following is an overview of the major changes made to NJOY for this update:
- LAW=61 is now allowed for photonuclear ACE libraries (the secondary angular distributions are now tabulated in all cases instead of being assumed isotropic when using LAW=1 LANG=1)
- Some photonuclear libraries use MF6/MT18 but with a neutron multiplicity equal to 1 instead of nubar. A warning is now printed when this is encountered and the multiplicity is replaced with the appropriate nubar data.
- thermal scattering ACE files now support mixed mode elastic scattering (both coherent and incoherent elastic scattering are used), with appropriate updates to THERMR and MODER
- The XSS array and its size is now set in the common acecm module. Writing out the ACE file and locator checking for photonuclear and thermal scattering files has been enabled as well (previously only available for incident neutron and charged particle ACE files).

In addition, the following minor issues were fixed as well:
- fixed a typo in a reaction name printed by the ACER output (issue #195)
- fixed a crash in ERRORR using ENDF/B-VIII.0 U235 for MF34 covariance data (issues #122 and #203)
- increased the size of an array when processing photonuclear ACE files (issue #204)
- extended the CLAW (iwt=9,10) weight function to cover 1e-5 -- 2e7 eV
- fixed issues with ACELAW=33 for continuous energy neutron, charged particle and photonuclear files (issue #212)
- fixed an issue when using the special charged particle interpolation law (INT=6) in RECONR
- fixed an issue with MODER not being able to handle MF28 (atomic relaxation data) when converting ASCII to binary

Notes:
- While the second minor fix no longer results in a crash of NJOY, the resulting covariance matrix is not correct since only the first subsubsection is added to the output (NJOY still calculates the matrices for each subsubsection - see issue #205)

## [NJOY2016.65](https://github.com/njoy/NJOY2016/pull/224)
This release fixes a processing issue for the d+Pt184 from TENDL-2021 in ACER. Some logic issue lead to MT11 being ignored as a deuteron producing reaction and this lead to processing problems in ACER.

Expand Down
54 changes: 52 additions & 2 deletions docs/testDescription.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,24 +273,74 @@ title: NJOY2016 Test Descriptions
- test 53: LAW=5 LTP=1 for identical particles with a spin s = 1 (this changes due to the fix but the original file does no have NaN values, as expected)
- test 54: LAW=5 LTP=1 for different particles (as expected, this remains the same before and after the fix)

## Test Problem 55-59
## Test Problem 55

Currently assigned in unmerged fixes
[[input](https://raw.githubusercontent.com/njoy/NJOY2016/master/tests/56/input)]

This test relates to changes made to an ACE file by the consistency checks when a checker `ACER` run is requested. NJOY only rarely modifies data. It does so for secondary particle distributions that use LAW=4 (isotropic angular distribution and continuous tabulated energy distributions) or LAW=44 (Kalbach-Mann). Under some circumstances, these changes used to introduce peaks in the data that obscured the plots.

## Test Problem 56-58

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

This test is added following issues in processing photonuclear data in `ACER`. These test uses the ENDF/B-VIII.0 photonuclear evaluation for U235 and Pb209, and the IAEA photonuclear evaluation for Co59.

## Test Problem 59

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

This test is added following an issue in `MODER` converting MF28 data (atomic relaxation data) (see issue [\#162](https://github.com/njoy/NJOY2016/issues/162)). Conversion of MF28 data was not coded. This test verifies that the conversion to and from binary produces the same file, and that the conversion to binary still allows the data to be used (in `ACER` in this test). Test 48 served as a basis for this test.

## Test Problem 60

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

This test was added to following issue [\#124](https://github.com/njoy/NJOY2016/issues/124) following processing issues using IRDFF-II ENDF files.

## Test Problem 61

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

This test was added to following issue [\#163](https://github.com/njoy/NJOY2016/issues/163). Whenever an `ACER` check run changed the library suffix, it was ignored. This has been fixed now and this test was added to validate the fix.

## Test Problem 62

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

This test was added to following issue [\#173](https://github.com/njoy/NJOY2016/issues/173). For a new d+He3 evaluation, the ACE file produced by NJOY2016 still has a few NaN values appearing in it. This problem was due to an array index overflow in acecpe.

## Test Problem 63

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

Tests 63 was added as a consequence of issue [\#178](https://github.com/njoy/NJOY2016/issues/178). It verifies that setting nunx in PURR to anything other than the default value does not break downstream processing (in this case up to ACER and VIEWR). The input file is equivalent to the input file for test 35 (with the exception of nunx which is set to 2).

## Test Problem 64

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

Tests 64 was added as a consequence of issue [\#201](https://github.com/njoy/NJOY2016/issues/201). Incorrect skipping of MF6 subsections with LAW=4 caused a reaction count issue for the secondary particles, resulting in a corrupt ACE file.

## Test Problem 65

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

Tests 65 was added as a consequence of issue [\#122](https://github.com/njoy/NJOY2016/issues/122) and [\#203](https://github.com/njoy/NJOY2016/issues/203). When using an MF34 with multiple subsubsections, the calculation now runs to completion.

## Test Problem 66

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

Tests 66 was added as a consequence of issue [\#214](https://github.com/njoy/NJOY2016/issues/214). It verifies that the yield (and production cross section) for secondary neutrons produced after photo-fission is equal to nubar when the evaluation uses an MF6/MT18 section for the PFNS in which the neutron yield is set to 1 instead of nubar.

## Test Problem 67-70

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

Tests 67-69 were added to test the new mixed mode elastic scattering processing for thermal scattering data in THERMR and ACER, which is going to be introduced in ENDF/B-VIII.1. The tests cover the following:
- test 67: inelastic plus mixed mode elastic (D in 7LiD, new format in ENDF/B-VIII.1)
- test 68: inelastic only (H in H2O)
- test 69: inelastic plus incoherent elastic (Zr in ZrH)
- test 70: inelastic plus coherent elastic (Al27)
125 changes: 122 additions & 3 deletions src/acecm.f90
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,15 @@ module acecm
implicit none
private

! main ace container array
integer,parameter,public::nxss=50000000
real(kr),public::xss(nxss)

!--Public routines
public mtname,ptleg2,pttab2,bachaa,eavl,newsuff
public advance_to_locator
public write_integer,write_real,write_integer_list,write_real_list
public typen

contains

Expand All @@ -30,7 +37,7 @@ subroutine mtname(mt,name,izai)
'(n,2n)iso ','(n,abs) ','(n,n*)p ','(n,n*)2a ','(n,2n)2a ',&
'(n,x) ','(n,n*)d ','(n,n*)t ','(n,n*)he3 ','(n,n*)d2a ',&
'(n,n*)t2a ','(n,4n) ','(n,3nf) ','(n,x) ','(n,x) ',&
'(n,2np) ','(n,3np) ','(n,x) ','(n,2np) ','(n,npa) ',&
'(n,2np) ','(n,3np) ','(n,x) ','(n,n2p) ','(n,npa) ',&
'(n,2/2*1) ','(n,2/2*2) ','(n,2/2*3) ','(n,2/2*4) ','(n,n*0) ',& !50
'(n,n*1) ','(n,n*2) ','(n,n*3) ','(n,n*4) ','(n,n*5) ',&
'(n,n*6) ','(n,n*7) ','(n,n*8) ','(n,n*9) ','(n,n*10) ',&
Expand Down Expand Up @@ -194,6 +201,8 @@ subroutine mtname(mt,name,izai)
if (izai.gt.1) then
if (mt.eq.4) then
name='(z,n) '
elseif (mt.eq.5) then
name='(z,x) '
elseif ((izai.eq.1001.and.mt.eq.103).or.&
(izai.eq.1002.and.mt.eq.104).or.&
(izai.eq.1003.and.mt.eq.105).or.&
Expand Down Expand Up @@ -654,7 +663,7 @@ subroutine newsuff(mcnpx,suff,hz)

indx=10
if (mcnpx.gt.0) indx=12

if (lenhz.lt.indx) then
idiff=indx-lenhz
do i=indx,indx-lenhz+1,-1 !push the string to the right so
Expand All @@ -666,5 +675,115 @@ subroutine newsuff(mcnpx,suff,hz)
return
end subroutine newsuff

end module acecm
subroutine advance_to_locator(nout,l,locator)
!-------------------------------------------------------------------
! Advance to the next locator position from the current position l.
! If the current position is not equal to the locator position, the
! function will advance l until it is equal to the locator position.
! It will write the values in the xss array while advancing to the
! new position.
!-------------------------------------------------------------------
use util
! externals
integer::nout,l,locator
! internals
character(66)::text
if (l.lt.locator) then
write(text,'(''expected xss index ('',i6,'') greater than '',&
&''current index ('',i6,'')'')') locator, l
call mess('advance',text,'xss array was padded accordingly')
do while (l.lt.locator)
call typen(l,nout,1)
l=l+1
enddo
else if (l.gt.locator) then
write(text,'(''expected xss index ('',i6,'') less than '',&
&''current index ('',i6,'')'')') locator, l
call error('advance',text,'this may be a serious problem')
endif
return
end subroutine advance_to_locator

subroutine write_integer(nout,l)
!-------------------------------------------------------------------
! Write an integer value at the position l, and advance l to the
! next position
!-------------------------------------------------------------------
! externals
integer::nout,l
call typen(l,nout,1)
l=l+1
return
end subroutine write_integer

subroutine write_real(nout,l)
!-------------------------------------------------------------------
! Write a real value at the position l, and advance l to the
! next position
!-------------------------------------------------------------------
! externals
integer::nout,l
call typen(l,nout,2)
l=l+1
return
end subroutine write_real

subroutine write_integer_list(nout,l,n)
!-------------------------------------------------------------------
! Write n integer values from position l, and advance l to the
! next position
!-------------------------------------------------------------------
! externals
integer::nout,l,n
! internals
integer::i
do i=1,n
call typen(l,nout,1)
l=l+1
enddo
return
end subroutine write_integer_list

subroutine write_real_list(nout,l,n)
!-------------------------------------------------------------------
! Write n real values from position l, and advance l to the
! next position
!-------------------------------------------------------------------
! externals
integer::nout,l,n
! internals
integer::i
do i=1,n
call typen(l,nout,2)
l=l+1
enddo
return
end subroutine write_real_list

subroutine typen(l,nout,iflag)
!-------------------------------------------------------------------
! Write an integer or a real number to a Type-1 ACE file,
! using either a floating-point or an integer print style.
! Use iflag.eq.1 to write an integer (i20).
! Use iflag.eq.2 to write a real number (1pe20.11).
! Use iflag.eq.3 to write partial line at end of file.
!-------------------------------------------------------------------
! externals
integer::l,nout,iflag
! internals
integer::i,j
character(20)::hl(4)
save hl,i

if (iflag.eq.3.and.nout.gt.1.and.i.lt.4) then
write(nout,'(4a20)') (hl(j),j=1,i)
else
i=mod(l-1,4)+1
if (iflag.eq.1) write(hl(i),'(i20)') nint(xss(l))
if (iflag.eq.2) write(hl(i),'(1p,e20.11)') xss(l)
if (i.eq.4) write(nout,'(4a20)') (hl(j),j=1,i)
endif
return
end subroutine typen

end module acecm
37 changes: 4 additions & 33 deletions src/acedo.f90
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module acedo
! provides ace dosimetry formats for acer
use locale
use acecm, only: xss,nxss
implicit none
private

Expand All @@ -25,10 +26,6 @@ module acedo
! parameters for dosimetry jxs block
integer::lone,jxs2,mtr,jxs4,jxs5,lsig,sigd,jxsd(14),end,jxsd2(10)

! main ace container array
integer,parameter::nxss=4999000
real(kr)::xss(nxss)

contains

subroutine acedos(matd,tempd,nin,nace,ndir,itype,iprint,mcnpx,&
Expand Down Expand Up @@ -61,6 +58,7 @@ subroutine acedos(matd,tempd,nin,nace,ndir,itype,iprint,mcnpx,&
jxs4=0
jxs5=0
jxsd2=0
xss=0

!--allocate scratch storage
nwscr=250000
Expand Down Expand Up @@ -484,7 +482,8 @@ subroutine dosout(itype,nout,ndir,mcnpx,hk,izn,awn)
!-------------------------------------------------------------------
! Write out the dosimetry file.
!-------------------------------------------------------------------
use util ! provides openz,closz
use util ! provides openz,closz,error
use acecm ! provides write routines
! externals
integer::itype,nout,ndir,mcnpx
integer::izn(16)
Expand Down Expand Up @@ -598,32 +597,4 @@ subroutine dosout(itype,nout,ndir,mcnpx,hk,izn,awn)
return
end subroutine dosout

subroutine typen(l,nout,iflag)
!-------------------------------------------------------------------
! Write an integer or a real number to a Type-1 ACE file,
! or (if nout=0) convert real to integer for type-3 output,
! or (if nout=1) convert integer to real for type-3 input.
! Use iflag.eq.1 to write an integer (i20).
! Use iflag.eq.2 to write a real number (1pe20.11).
! Use iflag.eq.3 to write partial line at end of file.
!-------------------------------------------------------------------
! externals
integer::l,nout,iflag
! internals
integer::i,j
character(20)::hl(4)
save hl,i

if (iflag.eq.3.and.nout.gt.1.and.i.lt.4) then
write(nout,'(4a20)') (hl(j),j=1,i)
else
i=mod(l-1,4)+1
if (iflag.eq.1) write(hl(i),'(i20)') nint(xss(l))
if (iflag.eq.2) write(hl(i),'(1p,e20.11)') xss(l)
if (i.eq.4) write(nout,'(4a20)') (hl(j),j=1,i)
endif
return
end subroutine typen

end module acedo

Loading

0 comments on commit b0ffb23

Please sign in to comment.