Skip to content

Commit

Permalink
Updating ce zaid values with zaoption
Browse files Browse the repository at this point in the history
  • Loading branch information
whaeck committed Feb 7, 2024
1 parent a45a8be commit ee89a97
Show file tree
Hide file tree
Showing 24 changed files with 377,646 additions and 10 deletions.
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
23 changes: 20 additions & 3 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 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 ee89a97

Please sign in to comment.