Skip to content

Commit

Permalink
Merge pull request #69 from njoy/feature/upn-iaea
Browse files Browse the repository at this point in the history
Feature/upn iaea
  • Loading branch information
jlconlin authored Mar 5, 2018
2 parents 1d3ba09 + 7a40865 commit c88900d
Show file tree
Hide file tree
Showing 23 changed files with 163,006 additions and 78 deletions.
18 changes: 18 additions & 0 deletions docs/testDescription.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,3 +164,21 @@ title: NJOY2016 Test Descriptions

This test is used to complete testing for the `ERRORR` module when processing MF35 covariances. Test 18 already has a test for this, but it uses an evaluation with a single covariance energy range (between 0 and 20 MeV). This test uses a Pu239 evaluation in which MF35 is composed of multiple covariance ranges. `ERRORR` is called twice in this run, once for the second range (between 5 and 6.5 MeV) and a second time using the -1 option with an efmean equal to 5.75 MeV (which should also be the second range). Both `ERRORR` runs should give the same results.

## Test Problem 28

[[input](https://raw.githubusercontent.com/njoy/NJOY2016/master/test/28/input)]

This test is used to test some of the options available to users when processing continuous energy data (iopt=1). There are currently three options (all defaulted to 1) concerning the user of law 61, whether or not detailed photons should be used and whether or not delayed neutron distributions should be smoothed to lower energies. The test consists of running `ACER` three times: once with the options defaulted, once with all options set to 1 explicitly and once with all options set to 0 explicitly. The first two ACE files should be identical.

## Test Problem 29

[[input](https://raw.githubusercontent.com/njoy/NJOY2016/master/test/29/input)]

This test is similar to test 28, but this one is for the smoothing option in `GROUPR`. The test consists of running `GROUPR` three times: once with the default smoothing option, once with the option set to 1 explicitly and once with the option set to 0 explicitly. The first two GENDF files should be identical.

## Test Problem 30

[[input](https://raw.githubusercontent.com/njoy/NJOY2016/master/test/30/input)]

This test is an addition to test 3 using `MATXSR`. While test 3 only uses photons, test 30 uses both neutrons and photons.

55 changes: 28 additions & 27 deletions src/acefc.f90
Original file line number Diff line number Diff line change
Expand Up @@ -86,27 +86,18 @@ module acefc
integer,parameter::nxss=20000000
real(kr)::xss(nxss)

! set ismooth to 1 to cause extension of mf6 cm distributions
! to lower energies using a sqrt(E) shape, to extend delayed
! neutron distributions as sqrt(E) to lower energies, and to
! add additional points above 10 Mev to some fission spectra
! assuming an exponential shape. otherwise, use ismooth=0.
! NOTE: ismooth=0 is the default value in njoy99.
integer,parameter::ismooth=1
! integer,parameter::ismooth=0

contains

subroutine acetop(nendf,npend,ngend,nace,ndir,iprint,itype,mcnpx,&
suff,hk,izn,awn,matd,tempd,newfor,iopp,thin)
suff,hk,izn,awn,matd,tempd,newfor,iopp,ismooth,thin)
!--------------------------------------------------------------------
! Prepare an ACE fast continuous file.
!--------------------------------------------------------------------
use mainio ! provides nsysi,nsyso
use util ! provides openz,mess,closz
use endf ! provides endf routines and variables
! externals
integer::nendf,npend,ngend,nace,ndir,iprint,itype,matd,newfor,iopp
integer::nendf,npend,ngend,nace,ndir,iprint,itype,matd,newfor,iopp,ismooth
integer::mcnpx
real(kr)::suff
character(70)::hk
Expand Down Expand Up @@ -184,7 +175,7 @@ subroutine acetop(nendf,npend,ngend,nace,ndir,iprint,itype,mcnpx,&
call atend(mscr,0)

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

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

subroutine acelod(nin,nedis,suff,matd,tempd,newfor,mcnpx)
subroutine acelod(nin,nedis,suff,matd,tempd,newfor,mcnpx,ismooth)
!-------------------------------------------------------------------
! Load data in ace format from the input file.
!-------------------------------------------------------------------
Expand All @@ -4803,7 +4794,7 @@ subroutine acelod(nin,nedis,suff,matd,tempd,newfor,mcnpx)
use util ! repoz,dater,error,skiprz,sigfig
use endf ! provides endf routines and variables
! externals
integer::nin,nedis,matd,newfor,mcnpx
integer::nin,nedis,matd,newfor,mcnpx,ismooth
real(kr)::suff,tempd
! internals
integer::nwscr,nnu,nnup,kfis,mtnr,mtntr,i,nnud,nnf
Expand Down Expand Up @@ -5802,9 +5793,11 @@ subroutine acelod(nin,nedis,suff,matd,tempd,newfor,mcnpx)
endif
enddo
if (mf.eq.5) then
call acelf5(next,i,matd,mt,q,nin)
call acelf5(next,i,matd,mt,q,nin,ismooth)
else if (mf.eq.6) then
if (mt518.eq.0) call acelf6(next,i,matd,mt,q,iza,izai,nin,newfor)
if (mt518.eq.0) then
call acelf6(next,i,matd,mt,q,iza,izai,nin,newfor,ismooth)
endif
else
if ((next+11).gt.nxss) call error('acelod',&
'insufficient space for energy distributions',' ')
Expand Down Expand Up @@ -5845,7 +5838,7 @@ subroutine acelod(nin,nedis,suff,matd,tempd,newfor,mcnpx)
mtxx=-1
if (iinel.ne.0) mtxx=iinel
mtaa=-1
if (iabso.ne.0) mtxx=iabso
if (iabso.ne.0) mtaa=iabso
xss(next+1)=nurb
xss(next+2)=2
xss(next+3)=mtxx
Expand Down Expand Up @@ -6522,15 +6515,15 @@ subroutine acecpe(next,scr,nin,awr,awp,spi,ne,lidp,ie,il,nes)
return
end subroutine acecpe

subroutine acelf5(next,i,matd,mt,q,nin)
subroutine acelf5(next,i,matd,mt,q,nin,ismooth)
!-------------------------------------------------------------------
! Process this reaction from File 5.
!-------------------------------------------------------------------
use mainio ! provides nsyso
use util ! provides sigfig
use endf ! provides endf routines and variables
! externals
integer::next,i,matd,mt,nin
integer::next,i,matd,mt,nin,ismooth
real(kr)::q
! internals
integer::nb,nw,nk,k,lf,m,n,jnt,ja,jb,j,l,nextn,nexd,ne,jscr,ki
Expand Down Expand Up @@ -6929,7 +6922,7 @@ subroutine acelf5(next,i,matd,mt,q,nin)
return
end subroutine acelf5

subroutine acelf6(next,i,matd,mt,q,iza,izai,nin,newfor)
subroutine acelf6(next,i,matd,mt,q,iza,izai,nin,newfor,ismooth)
!-------------------------------------------------------------------
! Prepare generalized yields and energy-angle distributions for
! this reaction from File 6.
Expand All @@ -6939,7 +6932,7 @@ subroutine acelf6(next,i,matd,mt,q,iza,izai,nin,newfor)
use endf ! provides endf routines and variables
use acecm ! provides bachaa,ptleg2,pttab2
! externals
integer::next,i,matd,mt,iza,izai,nin,newfor
integer::next,i,matd,mt,iza,izai,nin,newfor,ismooth
real(kr)::q
! internals
integer::nb,nw,lct,nk,jscr,ivar,ik,idone,ikk,law,m,n,jnt
Expand Down Expand Up @@ -7357,8 +7350,8 @@ subroutine acelf6(next,i,matd,mt,q,iza,izai,nin,newfor)
n=n-1
enddo
write(nsyso,'('' extending histograms as sqrt(E) below'',&
&1p,e10.2,'' MeV for E='',e10.2,'' MeV'')')&
scr(7+ncyc)/emev,ee
&1p,e10.2,'' MeV for E='',e10.2,'' MeV mt='',i3)')&
scr(7+ncyc)/emev,ee,mt
do while (scr(7+ncyc).gt.ex)
do ix=nx,1,-1
scr(6+ncyc+ix)=scr(6+ix)
Expand Down Expand Up @@ -7386,8 +7379,8 @@ subroutine acelf6(next,i,matd,mt,q,iza,izai,nin,newfor)
! insert those zero energy data
if (scr(7).gt.ex) then
write(nsyso,'('' extending lin-lin as sqrt(E) '',&
&''below'',1p,e10.2,'' eV for E='',e10.2,'' eV'')&
&')scr(7)/emev,ee
&''below'',1p,e10.2,'' MeV for E='',e10.2,'' MeV mt='')&
&')scr(7)/emev,ee,mt
do ix=nx,1,-1
scr(6+ncyc+ix)=scr(6+ix)
enddo
Expand Down Expand Up @@ -7495,7 +7488,11 @@ subroutine acelf6(next,i,matd,mt,q,iza,izai,nin,newfor)
!--distribution given in kalbach format
if (lang.eq.2) then
xss(ki+3*n+nexd)=scr(9+ncyc*(ki-1))
aa=bachaa(1,1,iza,ee,ep)
if (na.eq.2) then
aa=scr(10+ncyc*(ki-1))
else
aa=bachaa(1,1,iza,ee,ep)
endif
xss(ki+4*n+nexd)=sigfig(aa,7,0)

!--convert legendre distribution to kalbach form
Expand Down Expand Up @@ -10118,7 +10115,11 @@ subroutine acelcp(next,matd,nin,za,awr)
rkal=scr(lld+8+ncyc*(ig-1))
xss(next+1+ig+3*ng)=sigfig(rkal,7,0)
ep=xss(next+1+ig)
akal=bachaa(izai,izap,iza,ee,ep)
if (na.eq.2) then
akal=scr(lld+9+ncyc*(ig-1))
else
akal=bachaa(izai,izap,iza,ee,ep)
endif
xss(next+1+ig+4*ng)=sigfig(akal,7,0)
! legendre or tabulated distribution
else if (lawnow.eq.61) then
Expand Down
31 changes: 26 additions & 5 deletions src/acer.f90
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,14 @@ subroutine acer
! law 61, and outgoing particle distributions.
! (0=no, 1=yes, default=1)
! iopp detailed photons (0=no, 1=yes, default=1)
! ismooth switch on/off smoothing operation (1/0, default=1=on)
! set ismooth to 1 to cause extension of mf6 cm
! distributions to lower energies using a sqrt(E)
! shape, to extend delayed neutron distributions as
! sqrt(E) to lower energies, and to add additional
! points above 10 Mev to some fission spectra assuming
! an exponential shape. otherwise, use ismooth=0.
! NOTE: ismooth=0 is the default value in njoy99.
! card 7
! type of thinning is determined by sign of thin(1)
! (pos. or zero/neg.=energy skip/integral fraction)
Expand Down Expand Up @@ -229,7 +237,7 @@ subroutine acer
integer::iopt,iprint,itype,nxtra
integer::matd
real(kr)::tempd
integer::newfor,iopp
integer::newfor,iopp,ismooth
real(kr)::thin(4)
integer::iskf,iwtt,npts
real(kr)::suff
Expand Down Expand Up @@ -303,13 +311,26 @@ subroutine acer
matd,tempd
iopp=1
newfor=1
read(nsysi,*) newfor,iopp
ismooth=1
read(nsysi,*) newfor,iopp,ismooth
write(nsyso,'(&
&'' new formats .......................... '',i10/&
&'' photon option ........................ '',i10)')&
newfor,iopp
&'' photon option ........................ '',i10/&
&'' smoothing option ..................... '',i10)')&
newfor,iopp,ismooth
if (newfor.ne.0.and.newfor.ne.1) then
call error('acer','illegal newfor.',' ')
endif
if (iopp.ne.0.and.iopp.ne.1) then
call error('acer','illegal iopp.',' ')
endif
if (ismooth.ne.0.and.ismooth.ne.1) then
call error('acer','illegal ismooth.',' ')
endif
if (iopp.eq.0) write(nsyso,&
'(/'' photons will not be processed'')')
if (ismooth.eq.0) write(nsyso,&
'(/'' smoothing operation will not be performed'')')
mte=0
z(1)=0
z(2)=0
Expand Down Expand Up @@ -400,7 +421,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,thin)
hk,izn,awn,matd,tempd,newfor,iopp,ismooth,thin)

!--prepare thermal ace data
else if (iopt.eq.2) then
Expand Down
Loading

0 comments on commit c88900d

Please sign in to comment.