Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion NuclearData/Reactions/reactionMG/fissionMG_class.f90
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ module fissionMG_class
!!
public :: fissionMG_TptrCast

real(defReal), private, parameter :: KAPPA_DEFAULT = 202.27 ! [MeV]

!!
!! A special type of MG reaction that contains data related to fission
!!
Expand All @@ -26,14 +28,17 @@ module fissionMG_class
!! Fission spectrum is independent of the energy group
!!
!! Public members:
!! data -> data for fissionMG [energyGroup, reaction (nu or chi)]
!! data -> data for fissionMG [energyGroup, reaction (nu or chi)]
!! kappa -> Energy per fission. 200 MeV by default.
!!
!! Interface:
!! reactionMG interface
!! buildFromDict -> builds fissionMG from a SCONE dictionary
!! getKappa -> obtains the energy per fission in MeV
!!
type, public, extends(reactionMG) :: fissionMG
real(defReal),dimension(:,:),allocatable :: data
real(defReal) :: kappa = KAPPA_DEFAULT
contains
! Superclass procedures
procedure :: init
Expand All @@ -46,6 +51,7 @@ module fissionMG_class

! Local procedures
procedure :: buildFromDict
procedure :: getKappa

end type fissionMG

Expand Down Expand Up @@ -216,6 +222,9 @@ subroutine buildFromDict(self, dict)

! Get number of groups
call dict % get(nG, 'numberOfGroups')

! Get energy per fission
call dict % getOrDefault(self % kappa, 'kappa', KAPPA_DEFAULT)

! Allocate space
allocate(self % data(nG, 2))
Expand Down Expand Up @@ -246,6 +255,18 @@ subroutine buildFromDict(self, dict)

end subroutine buildFromDict

!!
!! Get the energy release from fission
!!
pure function getKappa(self) result(kappa)
class(fissionMG), intent(in) :: self
real(defReal) :: kappa

kappa = self % kappa

end function getKappa


!!
!! Cast reactionHandle pointer to fissionMG pointer
!!
Expand Down
17 changes: 17 additions & 0 deletions NuclearData/Reactions/uncorrelatedReactionCE/fissionCE_class.f90
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ module fissionCE_class
!! eLawPrompt -> Energy Law for the prompt fission neutrons
!! nuBarDelayed -> Delayed release table for incindent energy [MeV]
!! delayed -> Information about Delayed emission precursors
!! Q -> Q value for the reaction [MeV]
!!
!! Interface:
!! uncorrelatedReactionCE interface
Expand All @@ -65,6 +66,7 @@ module fissionCE_class
class(energyLawENDF), allocatable :: eLawPrompt
class(releaseLawENDF),allocatable :: nuBarDelayed
type(precursor),dimension(:),allocatable :: delayed
real(defReal) :: Q = ZERO

contains
! Superclass procedures
Expand All @@ -79,6 +81,7 @@ module fissionCE_class

! Type specific procedures
procedure :: buildFromACE
procedure :: getQ
end type fissionCE

contains
Expand Down Expand Up @@ -148,8 +151,21 @@ elemental subroutine kill(self)
deallocate(self % delayed)
end if

self % Q = ZERO

end subroutine kill

!!
!! Returns the Q-value
!!
pure function getQ(self) result(Q)
class(fissionCE), intent(in) :: self
real(defReal) :: Q

Q = self % Q

end function getQ

!!
!! Returns true if reaction is in Centre-Of-Mass frame
!!
Expand Down Expand Up @@ -349,6 +365,7 @@ subroutine buildFromACE(self, ACE, MT)
! Read basic data
call new_totalNU(self % nuBarTotal, ACE)
call new_energyLawENDF(self % eLawPrompt, ACE, MT)
self % Q = ACE % QforMT(MT)

! Read Delayed Data
if (withDelayed) then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -937,6 +937,9 @@ subroutine init(self, dict, ptr, silent )

end if

! Obtain the energy per fission with which to scale fission heating
call dict % getOrDefault(self % H235, 'energyPerFission', 202.27_defReal)

! Get path to ACE library
call dict % get(aceLibPath,'aceLibrary')

Expand Down
53 changes: 37 additions & 16 deletions NuclearData/ceNeutronData/aceDatabase/aceNeutronNuclide_class.f90
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,17 @@ module aceNeutronNuclide_class


! Grid location parameters
integer(shortInt), parameter :: TOTAL_XS = 1
integer(shortInt), parameter :: ESCATTER_XS = 2
integer(shortInt), parameter :: IESCATTER_XS = 3
integer(shortInt), parameter :: CAPTURE_XS = 4
integer(shortInt), parameter :: FISSION_XS = 5
integer(shortInt), parameter :: NU_FISSION = 6
integer(shortInt), parameter :: PROMPT_NU_FISSION = 7
integer(shortInt), parameter :: TOTAL_XS = 1
integer(shortInt), parameter :: ESCATTER_XS = 2
integer(shortInt), parameter :: IESCATTER_XS = 3
integer(shortInt), parameter :: CAPTURE_XS = 4
integer(shortInt), parameter :: FISSION_XS = 5
integer(shortInt), parameter :: NU_FISSION = 6
integer(shortInt), parameter :: KAPPA_XS = 7
integer(shortInt), parameter :: PROMPT_NU_FISSION = 8

integer(shortInt), parameter :: NON_FISSILE_SIZE = 4, &
FISSILE_SIZE = 8

!!
!! Groups data related to an MT reaction
Expand Down Expand Up @@ -437,10 +440,12 @@ elemental subroutine microXSs(self, xss, idx, f)
if (self % isFissile()) then
xss % fission = data(FISSION_XS, 2) * f + (ONE-f) * data(FISSION_XS, 1)
xss % nuFission = data(NU_FISSION, 2) * f + (ONE-f) * data(NU_FISSION, 1)
xss % kappaXS = data(KAPPA_XS, 2) * f + (ONE-f) * data(KAPPA_XS, 1)
xss % promptNuFission = data(PROMPT_NU_FISSION, 2) * f + (ONE-f) * data(PROMPT_NU_FISSION, 1)
else
xss % fission = ZERO
xss % nuFission = ZERO
xss % kappaXS = ZERO
xss % promptNuFission = ZERO
end if
end associate
Expand Down Expand Up @@ -486,10 +491,12 @@ subroutine getThXSs(self, xss, idx, f, E, kT, rand)
if (self % isFissile()) then
xss % fission = data(FISSION_XS, 2) * f + (ONE-f) * data(FISSION_XS, 1)
xss % nuFission = data(NU_FISSION, 2) * f + (ONE-f) * data(NU_FISSION, 1)
xss % kappaXS = data(KAPPA_XS, 2) * f + (ONE-f) * data(KAPPA_XS, 1)
xss % promptNuFission = data(PROMPT_NU_FISSION, 2) * f + (ONE-f) * data(PROMPT_NU_FISSION, 1)
else
xss % fission = ZERO
xss % nuFission = ZERO
xss % fission = ZERO
xss % nuFission = ZERO
xss % kappaXS = ZERO
xss % promptNuFission = ZERO
end if

Expand Down Expand Up @@ -560,10 +567,12 @@ subroutine getUrrXSs(self, xss, idx, f, E, xi)
if (self % isFissile()) then
xss % fission = data(FISSION_XS, 2) * f + (ONE-f) * data(FISSION_XS, 1)
xss % nuFission = data(NU_FISSION, 2) * f + (ONE-f) * data(NU_FISSION, 1)
xss % kappaXS = data(KAPPA_XS, 2) * f + (ONE-f) * data(KAPPA_XS, 1)
xss % promptNuFission = data(PROMPT_NU_FISSION, 2) * f + (ONE-f) * data(PROMPT_NU_FISSION, 1)
else
xss % fission = ZERO
xss % nuFission = ZERO
xss % fission = ZERO
xss % nuFission = ZERO
xss % kappaXS = ZERO
xss % promptNuFission = ZERO
end if

Expand Down Expand Up @@ -594,6 +603,7 @@ subroutine getUrrXSs(self, xss, idx, f, E, xi)

if (self % isFissile()) then
xss % nuFission = xss % nuFission/xss % fission * val(3)
xss % kappaXS = xss % kappaXS / xss % fission * val(3)
xss % promptNuFission = xss % promptNuFission/xss % fission * val(3)
xss % fission = val(3)
end if
Expand Down Expand Up @@ -733,6 +743,7 @@ subroutine init(self, ACE, nucIdx, database)
top, firstIdxMT4
real(defReal), dimension(:), allocatable :: xsMT4
type(stackInt) :: scatterMT, absMT
real(defReal) :: H_Q
character(100), parameter :: Here = "init (aceNeutronNuclide_class.f90)"

! Reset nuclide just in case
Expand All @@ -753,9 +764,9 @@ subroutine init(self, ACE, nucIdx, database)

! Allocate space for main XSs
if (self % isFissile()) then
N = 7
N = FISSILE_SIZE
else
N = 4
N = NON_FISSILE_SIZE
end if

allocate(self % mainData(N, Ngrid))
Expand Down Expand Up @@ -815,10 +826,20 @@ subroutine init(self, ACE, nucIdx, database)
call self % fission % init(ACE, N_f)
end if

! Calculate nuFission
! Obtain Heating/Q scaling ratio
! Check if database is associated in order to satisfy tests where it might not be!
if (associated(database)) then
H_Q = database % H235 / database % Q235
else
H_Q = ONE
end if

! Calculate nuFission and kappaXS
do i = bottom, Ngrid
self % mainData(NU_FISSION,i) = self % mainData(FISSION_XS,i) * &
self % fission % release(self % eGrid(i))
self % mainData(NU_FISSION,i) = self % mainData(FISSION_XS,i) * &
self % fission % release(self % eGrid(i))
self % mainData(KAPPA_XS,i) = self % mainData(FISSION_XS,i) * &
self % fission % getQ() * H_Q
self % mainData(PROMPT_NU_FISSION,i) = self % mainData(FISSION_XS,i) * &
self % fission % releasePrompt(self % eGrid(i))
end do
Expand Down
6 changes: 6 additions & 0 deletions NuclearData/ceNeutronData/ceNeutronDatabase_inter.f90
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ module ceNeutronDatabase_inter
!!
!! Public Members:
!! mapDBRCnuc -> map to link indexes of DBRC nuclides with their corresponding 0K
!! H235 -> heating fission of U235, used for scaling fission energy
!! Q235 -> Q-value of U235 fission, used for scaling fission energy
!!
!! Interface:
!! nuclearDatabase Interface
Expand All @@ -53,6 +55,10 @@ module ceNeutronDatabase_inter
!!
type, public, abstract, extends(nuclearDatabase) :: ceNeutronDatabase
type(intMap) :: mapDBRCnuc

! Default fission scaling [MeV]
real(defReal) :: H235 = 202.27_defReal
real(defReal) :: Q235 = 193.406_defReal

contains

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,11 @@ subroutine getMacroXSs_byG(self, xss, G, rand)
if(self % isFissile()) then
xss % fission = self % data(FISSION_XS, G)
xss % nuFission = self % data(NU_FISSION, G)
xss % kappaXS = xss % fission * self % fission % getKappa()
else
xss % fission = ZERO
xss % nuFission = ZERO
xss % kappaXS = ZERO
end if

end subroutine getMacroXSs_byG
Expand Down
11 changes: 10 additions & 1 deletion NuclearData/testNeutronData/testNeutronDatabase_class.f90
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,20 @@ module testNeutronDatabase_class
!! captureXS [in] -> Optional. Value of Capture XS
!! fissionXS [in] -> Optional. Value of Fission XS
!! nuFissionXS [in] -> Optional Value of nuFission
!! kappaXS [in] -> Optional Value of kappa XS
!!
!! Errors:
!! None
!!
subroutine build(self, xsVal, eScatterXS, ieScatterXS ,captureXS, fissionXS, nuFissionXS)
subroutine build(self, xsVal, eScatterXS, ieScatterXS ,captureXS, fissionXS, nuFissionXS, kappaXS)
class(testNeutroNDatabase), intent(inout) :: self
real(defReal), intent(in) :: xsVal
real(defReal), intent(in),optional :: eScatterXS
real(defReal), intent(in),optional :: ieScatterXS
real(defReal), intent(in),optional :: captureXS
real(defReal), intent(in),optional :: fissionXS
real(defReal), intent(in),optional :: nuFissionXS
real(defReal), intent(in),optional :: kappaXS

self % xsVal = xsVal

Expand Down Expand Up @@ -126,6 +128,13 @@ subroutine build(self, xsVal, eScatterXS, ieScatterXS ,captureXS, fissionXS, nuF
else
self % mat % xss % nuFission = xsVal
end if

! kappa * fission
if(present(kappaXS)) then
self % mat % xss % kappaXS = kappaXS
else
self % mat % xss % kappaXS = xsVal
end if

end subroutine build

Expand Down
12 changes: 10 additions & 2 deletions NuclearData/xsPackages/neutronXsPackages_class.f90
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
!! This module brakes standard rules
!! It contains a library of XS Packages for Neutron particle type
!!
!!
module neutronXsPackages_class

use numPrecision
Expand All @@ -22,6 +21,7 @@ module neutronXsPackages_class
!! capture -> sum of all reactions without secendary neutrons excluding fission [1/cm]
!! fission -> total Fission MT=18 Cross-section [1/cm]
!! nuFission -> total average neutron production Cross-section [1/cm]
!! kappaXS -> heating cross-section [MeV/cm]
!! promptNuFission -> prompt-only average neutron production Cross-section [1/cm]
!!
!! Interface:
Expand All @@ -36,6 +36,7 @@ module neutronXsPackages_class
real(defReal) :: capture = ZERO
real(defReal) :: fission = ZERO
real(defReal) :: nuFission = ZERO
real(defReal) :: kappaXS = ZERO
real(defReal) :: promptNuFission = ZERO
contains
procedure :: clean => clean_neutronMacroXSs
Expand All @@ -56,6 +57,7 @@ module neutronXsPackages_class
!! capture -> all reactions without secendary neutrons excluding fission [barn]
!! fission -> total Fission MT=18 Cross-section [barn]
!! nuFission -> total average neutron production Cross-section [barn]
!! kappaXS -> heating Cross-section [MeV*barn]
!! promptNuFission -> prompt-only average neutron production Cross-section [barn]
!!
type, public :: neutronMicroXSs
Expand All @@ -65,6 +67,7 @@ module neutronXsPackages_class
real(defReal) :: capture = ZERO
real(defReal) :: fission = ZERO
real(defReal) :: nuFission = ZERO
real(defReal) :: kappaXS = ZERO
real(defReal) :: promptNuFission = ZERO
contains
procedure :: invert => invert_microXSs
Expand Down Expand Up @@ -92,6 +95,7 @@ elemental subroutine clean_neutronMacroXSs(self)
self % capture = ZERO
self % fission = ZERO
self % nuFission = ZERO
self % kappaXS = ZERO
self % promptNuFission = ZERO

end subroutine clean_neutronMacroXSs
Expand Down Expand Up @@ -119,6 +123,7 @@ elemental subroutine add_neutronMacroXSs(self, micro, dens)
self % capture = self % capture + dens * micro % capture
self % fission = self % fission + dens * micro % fission
self % nuFission = self % nuFission + dens * micro % nuFission
self % kappaXS = self % kappaXS + dens * micro % kappaXS
self % promptNuFission = self % promptNuFission + dens * micro % promptNuFission

end subroutine add_neutronMacroXSs
Expand Down Expand Up @@ -165,6 +170,9 @@ elemental function get(self, MT) result(xs)
case(macroNuFission)
xs = self % nuFission

case(macroKappaFission)
xs = self % kappaXS

case(macroPromptNuFission)
xs = self % promptNuFission

Expand Down Expand Up @@ -245,7 +253,7 @@ end function invert_macroXSs
!!
!! Use a real r in <0;1> to sample reaction from Microscopic XSs
!!
!! This function involves a bit of code so is written for conviniance
!! This function involves a bit of code so is written for convenience
!!
!! Args:
!! r [in] -> Real number in <0;1>
Expand Down
Loading