Skip to content

Commit 87f2ecf

Browse files
Fission energy release (#197)
Added fission energy release as a cross section
1 parent 91da9e1 commit 87f2ecf

File tree

20 files changed

+260
-65
lines changed

20 files changed

+260
-65
lines changed

IntegrationTestFiles/mgMat2

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,5 @@ fission (1.0 0.0 0.0 0.0);
2525
chi (0.8 0.2 0.0 0.0);
2626

2727
nu (2.3 0.0 0.0 0.0);
28+
29+
kappa (202 193 180 200);

NuclearData/Reactions/reactionMG/Tests/fissionMG_test.f90

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ module fissionMG_test
1717
!!
1818
real(defReal),dimension(*),parameter :: nu = [2.3_defReal, 2.0_defReal, 1.3_defReal]
1919
real(defReal),dimension(*),parameter :: chi = [0.333333_defReal, 0.333333_defReal, 0.333334_defReal]
20-
21-
20+
real(defReal),dimension(*),parameter :: kappa = [200.0_defReal, 203.0_defReal, 201.0_defReal]
2221

2322
contains
2423

@@ -63,6 +62,7 @@ subroutine fissionMG_Build_And_Functionality()
6362
! Test Misc functionality
6463
@assertEqual(ZERO, reaction % releaseDelayed(1), TOL)
6564
@assertEqual(ZERO, reaction % sampleDelayRate(2, rand),TOL )
65+
@assertEqual(202.27_defReal, reaction % getKappa(7),1E-5)
6666

6767
! Test Release
6868
@assertEqual(ZERO, reaction % releasePrompt(-2), TOL)
@@ -74,6 +74,19 @@ subroutine fissionMG_Build_And_Functionality()
7474
call dictT % kill()
7575
call reaction % kill()
7676

77+
! Restart and test with kappa data included
78+
call dictT % init(3)
79+
call dictT % store('numberOfGroups',3)
80+
call dictT % store('chi', chi)
81+
call dictT % store('nu',nu)
82+
call dictT % store('kappa', kappa)
83+
84+
! Build data Deck and initialise
85+
data % dict => dictT
86+
call reaction % init(data, macroFission)
87+
@assertEqual(203.0_defReal, reaction % getKappa(2), 1E-5)
88+
7789
end subroutine fissionMG_Build_And_Functionality
7890

91+
7992
end module fissionMG_test

NuclearData/Reactions/reactionMG/fissionMG_class.f90

Lines changed: 48 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,21 @@ module fissionMG_class
2222
!! A special type of MG reaction that contains data related to fission
2323
!!
2424
!! At the moment it has no information about delayed emissions, shall be introduced
25-
!! at a latter date.
25+
!! at a later date.
2626
!! Fission spectrum is independent of the energy group
2727
!!
2828
!! Public members:
29-
!! data -> data for fissionMG [energyGroup, reaction (nu or chi)]
29+
!! data -> data for fissionMG [energyGroup, reaction (nu, chi, or optionally kappa)]
30+
!! hasKappa -> flag for whether there is energy per fission data
3031
!!
3132
!! Interface:
3233
!! reactionMG interface
3334
!! buildFromDict -> builds fissionMG from a SCONE dictionary
35+
!! getKappa -> obtains the energy per fission in MeV
3436
!!
3537
type, public, extends(reactionMG) :: fissionMG
3638
real(defReal),dimension(:,:),allocatable :: data
39+
logical(defBool) :: hasKappa = .false.
3740
contains
3841
! Superclass procedures
3942
procedure :: init
@@ -46,13 +49,19 @@ module fissionMG_class
4649

4750
! Local procedures
4851
procedure :: buildFromDict
52+
procedure :: getKappa
4953

5054
end type fissionMG
5155

5256
!!
5357
!! Reaction indices
5458
!!
55-
integer(shortInt),parameter :: NU_DAT = 1, CHI_DAT = 2
59+
integer(shortInt),parameter :: NU_DAT = 1, CHI_DAT = 2, KAPPA_DAT = 3
60+
61+
!!
62+
!! Default value of kappa used if no data is provided
63+
!!
64+
real(defReal), private, parameter :: KAPPA_DEFAULT = 202.27 ! [MeV]
5665

5766
contains
5867

@@ -216,9 +225,27 @@ subroutine buildFromDict(self, dict)
216225

217226
! Get number of groups
218227
call dict % get(nG, 'numberOfGroups')
228+
229+
! Check if energy per fission is present and allocate space appropriately
230+
if (dict % isPresent('kappa')) then
231+
232+
self % hasKappa = .true.
233+
allocate(self % data(nG, 3))
234+
235+
! Get kappa
236+
call dict % get(temp, 'kappa')
237+
if(size(temp) /= ng) then
238+
call fatalError(Here, 'Invalid number of values of kappa. Given: '// numToChar(size(temp)) // &
239+
' Expected: ' // numToChar(nG))
240+
end if
241+
self % data(:,KAPPA_DAT) = temp
242+
243+
else
244+
245+
self % hasKappa = .false.
246+
allocate(self % data(nG, 2))
219247

220-
! Allocate space
221-
allocate(self % data(nG, 2))
248+
end if
222249

223250
! Get nu
224251
call dict % get(temp, 'nu')
@@ -246,6 +273,22 @@ subroutine buildFromDict(self, dict)
246273

247274
end subroutine buildFromDict
248275

276+
!!
277+
!! Get the energy release from fission
278+
!!
279+
pure function getKappa(self, G) result(kappa)
280+
class(fissionMG), intent(in) :: self
281+
integer(shortInt), intent(in) :: G
282+
real(defReal) :: kappa
283+
284+
if (self % hasKappa) then
285+
kappa = self % data(G, KAPPA_DAT)
286+
else
287+
kappa = KAPPA_DEFAULT
288+
end if
289+
290+
end function getKappa
291+
249292
!!
250293
!! Cast reactionHandle pointer to fissionMG pointer
251294
!!
@@ -270,5 +313,4 @@ pure function fissionMG_TptrCast(source) result(ptr)
270313

271314
end function fissionMG_TptrCast
272315

273-
274316
end module fissionMG_class

NuclearData/Reactions/uncorrelatedReactionCE/fissionCE_class.f90

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ module fissionCE_class
5454
!! eLawPrompt -> Energy Law for the prompt fission neutrons
5555
!! nuBarDelayed -> Delayed release table for incindent energy [MeV]
5656
!! delayed -> Information about Delayed emission precursors
57+
!! Q -> Q value for the reaction [MeV]
5758
!!
5859
!! Interface:
5960
!! uncorrelatedReactionCE interface
@@ -65,6 +66,7 @@ module fissionCE_class
6566
class(energyLawENDF), allocatable :: eLawPrompt
6667
class(releaseLawENDF),allocatable :: nuBarDelayed
6768
type(precursor),dimension(:),allocatable :: delayed
69+
real(defReal) :: Q = ZERO
6870

6971
contains
7072
! Superclass procedures
@@ -79,6 +81,7 @@ module fissionCE_class
7981

8082
! Type specific procedures
8183
procedure :: buildFromACE
84+
procedure :: getQ
8285
end type fissionCE
8386

8487
contains
@@ -148,8 +151,21 @@ elemental subroutine kill(self)
148151
deallocate(self % delayed)
149152
end if
150153

154+
self % Q = ZERO
155+
151156
end subroutine kill
152157

158+
!!
159+
!! Returns the Q-value
160+
!!
161+
pure function getQ(self) result(Q)
162+
class(fissionCE), intent(in) :: self
163+
real(defReal) :: Q
164+
165+
Q = self % Q
166+
167+
end function getQ
168+
153169
!!
154170
!! Returns true if reaction is in Centre-Of-Mass frame
155171
!!
@@ -349,6 +365,7 @@ subroutine buildFromACE(self, ACE, MT)
349365
! Read basic data
350366
call new_totalNU(self % nuBarTotal, ACE)
351367
call new_energyLawENDF(self % eLawPrompt, ACE, MT)
368+
self % Q = ACE % QforMT(MT)
352369

353370
! Read Delayed Data
354371
if (withDelayed) then

NuclearData/ceNeutronData/aceDatabase/aceNeutronDatabase_class.f90

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -937,6 +937,9 @@ subroutine init(self, dict, ptr, silent )
937937

938938
end if
939939

940+
! Obtain the energy per fission with which to scale fission heating
941+
call dict % getOrDefault(self % H235, 'energyPerFission', 202.27_defReal)
942+
940943
! Get path to ACE library
941944
call dict % get(aceLibPath,'aceLibrary')
942945

NuclearData/ceNeutronData/aceDatabase/aceNeutronNuclide_class.f90

Lines changed: 37 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,17 @@ module aceNeutronNuclide_class
4141

4242

4343
! Grid location parameters
44-
integer(shortInt), parameter :: TOTAL_XS = 1
45-
integer(shortInt), parameter :: ESCATTER_XS = 2
46-
integer(shortInt), parameter :: IESCATTER_XS = 3
47-
integer(shortInt), parameter :: CAPTURE_XS = 4
48-
integer(shortInt), parameter :: FISSION_XS = 5
49-
integer(shortInt), parameter :: NU_FISSION = 6
50-
integer(shortInt), parameter :: PROMPT_NU_FISSION = 7
44+
integer(shortInt), parameter :: TOTAL_XS = 1
45+
integer(shortInt), parameter :: ESCATTER_XS = 2
46+
integer(shortInt), parameter :: IESCATTER_XS = 3
47+
integer(shortInt), parameter :: CAPTURE_XS = 4
48+
integer(shortInt), parameter :: FISSION_XS = 5
49+
integer(shortInt), parameter :: NU_FISSION = 6
50+
integer(shortInt), parameter :: KAPPA_XS = 7
51+
integer(shortInt), parameter :: PROMPT_NU_FISSION = 8
5152

53+
integer(shortInt), parameter :: NON_FISSILE_SIZE = 4, &
54+
FISSILE_SIZE = 8
5255

5356
!!
5457
!! Groups data related to an MT reaction
@@ -437,10 +440,12 @@ elemental subroutine microXSs(self, xss, idx, f)
437440
if (self % isFissile()) then
438441
xss % fission = data(FISSION_XS, 2) * f + (ONE-f) * data(FISSION_XS, 1)
439442
xss % nuFission = data(NU_FISSION, 2) * f + (ONE-f) * data(NU_FISSION, 1)
443+
xss % kappaXS = data(KAPPA_XS, 2) * f + (ONE-f) * data(KAPPA_XS, 1)
440444
xss % promptNuFission = data(PROMPT_NU_FISSION, 2) * f + (ONE-f) * data(PROMPT_NU_FISSION, 1)
441445
else
442446
xss % fission = ZERO
443447
xss % nuFission = ZERO
448+
xss % kappaXS = ZERO
444449
xss % promptNuFission = ZERO
445450
end if
446451
end associate
@@ -486,10 +491,12 @@ subroutine getThXSs(self, xss, idx, f, E, kT, rand)
486491
if (self % isFissile()) then
487492
xss % fission = data(FISSION_XS, 2) * f + (ONE-f) * data(FISSION_XS, 1)
488493
xss % nuFission = data(NU_FISSION, 2) * f + (ONE-f) * data(NU_FISSION, 1)
494+
xss % kappaXS = data(KAPPA_XS, 2) * f + (ONE-f) * data(KAPPA_XS, 1)
489495
xss % promptNuFission = data(PROMPT_NU_FISSION, 2) * f + (ONE-f) * data(PROMPT_NU_FISSION, 1)
490496
else
491-
xss % fission = ZERO
492-
xss % nuFission = ZERO
497+
xss % fission = ZERO
498+
xss % nuFission = ZERO
499+
xss % kappaXS = ZERO
493500
xss % promptNuFission = ZERO
494501
end if
495502

@@ -560,10 +567,12 @@ subroutine getUrrXSs(self, xss, idx, f, E, xi)
560567
if (self % isFissile()) then
561568
xss % fission = data(FISSION_XS, 2) * f + (ONE-f) * data(FISSION_XS, 1)
562569
xss % nuFission = data(NU_FISSION, 2) * f + (ONE-f) * data(NU_FISSION, 1)
570+
xss % kappaXS = data(KAPPA_XS, 2) * f + (ONE-f) * data(KAPPA_XS, 1)
563571
xss % promptNuFission = data(PROMPT_NU_FISSION, 2) * f + (ONE-f) * data(PROMPT_NU_FISSION, 1)
564572
else
565-
xss % fission = ZERO
566-
xss % nuFission = ZERO
573+
xss % fission = ZERO
574+
xss % nuFission = ZERO
575+
xss % kappaXS = ZERO
567576
xss % promptNuFission = ZERO
568577
end if
569578

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

595604
if (self % isFissile()) then
596605
xss % nuFission = xss % nuFission/xss % fission * val(3)
606+
xss % kappaXS = xss % kappaXS / xss % fission * val(3)
597607
xss % promptNuFission = xss % promptNuFission/xss % fission * val(3)
598608
xss % fission = val(3)
599609
end if
@@ -733,6 +743,7 @@ subroutine init(self, ACE, nucIdx, database)
733743
top, firstIdxMT4
734744
real(defReal), dimension(:), allocatable :: xsMT4
735745
type(stackInt) :: scatterMT, absMT
746+
real(defReal) :: H_Q
736747
character(100), parameter :: Here = "init (aceNeutronNuclide_class.f90)"
737748

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

754765
! Allocate space for main XSs
755766
if (self % isFissile()) then
756-
N = 7
767+
N = FISSILE_SIZE
757768
else
758-
N = 4
769+
N = NON_FISSILE_SIZE
759770
end if
760771

761772
allocate(self % mainData(N, Ngrid))
@@ -815,10 +826,20 @@ subroutine init(self, ACE, nucIdx, database)
815826
call self % fission % init(ACE, N_f)
816827
end if
817828

818-
! Calculate nuFission
829+
! Obtain Heating/Q scaling ratio
830+
! Check if database is associated in order to satisfy tests where it might not be!
831+
if (associated(database)) then
832+
H_Q = database % H235 / database % Q235
833+
else
834+
H_Q = ONE
835+
end if
836+
837+
! Calculate nuFission and kappaXS
819838
do i = bottom, Ngrid
820-
self % mainData(NU_FISSION,i) = self % mainData(FISSION_XS,i) * &
821-
self % fission % release(self % eGrid(i))
839+
self % mainData(NU_FISSION,i) = self % mainData(FISSION_XS,i) * &
840+
self % fission % release(self % eGrid(i))
841+
self % mainData(KAPPA_XS,i) = self % mainData(FISSION_XS,i) * &
842+
self % fission % getQ() * H_Q
822843
self % mainData(PROMPT_NU_FISSION,i) = self % mainData(FISSION_XS,i) * &
823844
self % fission % releasePrompt(self % eGrid(i))
824845
end do

NuclearData/ceNeutronData/ceNeutronDatabase_inter.f90

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ module ceNeutronDatabase_inter
3939
!!
4040
!! Public Members:
4141
!! mapDBRCnuc -> map to link indexes of DBRC nuclides with their corresponding 0K
42+
!! H235 -> heating fission of U235, used for scaling fission energy
43+
!! Q235 -> Q-value of U235 fission, used for scaling fission energy
4244
!!
4345
!! Interface:
4446
!! nuclearDatabase Interface
@@ -53,6 +55,10 @@ module ceNeutronDatabase_inter
5355
!!
5456
type, public, abstract, extends(nuclearDatabase) :: ceNeutronDatabase
5557
type(intMap) :: mapDBRCnuc
58+
59+
! Default fission scaling [MeV]
60+
real(defReal) :: H235 = 202.27_defReal
61+
real(defReal) :: Q235 = 193.406_defReal
5662

5763
contains
5864

NuclearData/mgNeutronData/baseMgNeutron/Tests/baseMgNeutronDatabase_iTest.f90

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ subroutine testBaseMgNeutronDatabaseWithP0()
114114
@assertEqual(1.0_defReal, xss % capture, TOL)
115115
@assertEqual(1.0_defReal, xss % fission, TOL)
116116
@assertEqual(2.3_defReal, xss % nuFission, TOL)
117+
@assertEqual(202.0_defReal, xss % kappaXS, TOL)
117118

118119
matClass => baseMgNeutronMaterial_CptrCast(database % getMaterial(1))
119120
@assertTrue(associated(matClass), "Type Ptr Cast has failed")
@@ -127,6 +128,7 @@ subroutine testBaseMgNeutronDatabaseWithP0()
127128
@assertEqual(4.0_defReal, xss % capture, TOL)
128129
@assertEqual(0.0_defReal, xss % fission, TOL)
129130
@assertEqual(0.0_defReal, xss % nuFission, TOL)
131+
@assertEqual(0.0_defReal, xss % kappaXS, TOL)
130132

131133
! Get some invalid Materials
132134
mat => baseMgNeutronMaterial_TptrCast(database % getMaterial(0))
@@ -243,6 +245,7 @@ subroutine testBaseMgNeutronDatabaseWithP1()
243245
@assertEqual(1.0_defReal, xss % capture, TOL)
244246
@assertEqual(1.0_defReal, xss % fission, TOL)
245247
@assertEqual(2.3_defReal, xss % nuFission, TOL)
248+
@assertEqual(202.0_defReal, xss % kappaXS, TOL)
246249

247250
matClass => baseMgNeutronMaterial_CptrCast(database % getMaterial(1))
248251
@assertTrue(associated(matClass), "Type Ptr Cast has failed")
@@ -256,6 +259,7 @@ subroutine testBaseMgNeutronDatabaseWithP1()
256259
@assertEqual(4.0_defReal, xss % capture, TOL)
257260
@assertEqual(0.0_defReal, xss % fission, TOL)
258261
@assertEqual(0.0_defReal, xss % nuFission, TOL)
262+
@assertEqual(0.0_defReal, xss % kappaXS, TOL)
259263

260264
! Get some invalid Materials
261265
mat => baseMgNeutronMaterial_TptrCast(database % getMaterial(0))

0 commit comments

Comments
 (0)