Skip to content

Commit

Permalink
Removing transport score capability and replacing with error message …
Browse files Browse the repository at this point in the history
…to let users know of deprecation. Also removed that same error message for diffusion
  • Loading branch information
nelsonag committed May 26, 2016
1 parent af82534 commit ccc7da1
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 65 deletions.
29 changes: 14 additions & 15 deletions src/constants.F90
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ module constants
EVENT_ABSORB = 2

! Tally score type
integer, parameter :: N_SCORE_TYPES = 22
integer, parameter :: N_SCORE_TYPES = 21
integer, parameter :: &
SCORE_FLUX = -1, & ! flux
SCORE_TOTAL = -2, & ! total reaction rate
Expand All @@ -289,20 +289,19 @@ module constants
SCORE_SCATTER_PN = -6, & ! system for scoring 0th through nth moment
SCORE_NU_SCATTER_N = -7, & ! arbitrary nu-scattering moment
SCORE_NU_SCATTER_PN = -8, & ! system for scoring 0th through nth nu-scatter moment
SCORE_TRANSPORT = -9, & ! transport reaction rate
SCORE_N_1N = -10, & ! (n,1n) rate
SCORE_ABSORPTION = -11, & ! absorption rate
SCORE_FISSION = -12, & ! fission rate
SCORE_NU_FISSION = -13, & ! neutron production rate
SCORE_KAPPA_FISSION = -14, & ! fission energy production rate
SCORE_CURRENT = -15, & ! partial current
SCORE_FLUX_YN = -16, & ! angular moment of flux
SCORE_TOTAL_YN = -17, & ! angular moment of total reaction rate
SCORE_SCATTER_YN = -18, & ! angular flux-weighted scattering moment (0:N)
SCORE_NU_SCATTER_YN = -19, & ! angular flux-weighted nu-scattering moment (0:N)
SCORE_EVENTS = -20, & ! number of events
SCORE_DELAYED_NU_FISSION = -21, & ! delayed neutron production rate
SCORE_INVERSE_VELOCITY = -22 ! flux-weighted inverse velocity
SCORE_N_1N = -9, & ! (n,1n) rate
SCORE_ABSORPTION = -10, & ! absorption rate
SCORE_FISSION = -11, & ! fission rate
SCORE_NU_FISSION = -12, & ! neutron production rate
SCORE_KAPPA_FISSION = -13, & ! fission energy production rate
SCORE_CURRENT = -14, & ! partial current
SCORE_FLUX_YN = -15, & ! angular moment of flux
SCORE_TOTAL_YN = -16, & ! angular moment of total reaction rate
SCORE_SCATTER_YN = -17, & ! angular flux-weighted scattering moment (0:N)
SCORE_NU_SCATTER_YN = -18, & ! angular flux-weighted nu-scattering moment (0:N)
SCORE_EVENTS = -19, & ! number of events
SCORE_DELAYED_NU_FISSION = -20, & ! delayed neutron production rate
SCORE_INVERSE_VELOCITY = -21 ! flux-weighted inverse velocity

! Maximum scattering order supported
integer, parameter :: MAX_ANG_ORDER = 10
Expand Down
2 changes: 0 additions & 2 deletions src/endf.F90
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ pure function reaction_name(MT) result(string)
string = "nu-scatter-n"
case (SCORE_NU_SCATTER_PN)
string = "nu-scatter-pn"
case (SCORE_TRANSPORT)
string = "transport"
case (SCORE_N_1N)
string = "n1n"
case (SCORE_ABSORPTION)
Expand Down
8 changes: 2 additions & 6 deletions src/input_xml.F90
Original file line number Diff line number Diff line change
Expand Up @@ -3493,13 +3493,9 @@ subroutine read_tallies_xml()
j = j + n_bins - 1

case('transport')
t % score_bins(j) = SCORE_TRANSPORT

! Set tally estimator to analog
t % estimator = ESTIMATOR_ANALOG
case ('diffusion')
call fatal_error("Diffusion score no longer supported for tallies, &
call fatal_error("Transport score no longer supported for tallies, &
&please remove")

case ('n1n')
if (run_CE) then
t % score_bins(j) = SCORE_N_1N
Expand Down
1 change: 0 additions & 1 deletion src/output.F90
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,6 @@ subroutine write_tallies()
score_names(abs(SCORE_TOTAL)) = "Total Reaction Rate"
score_names(abs(SCORE_SCATTER)) = "Scattering Rate"
score_names(abs(SCORE_NU_SCATTER)) = "Scattering Production Rate"
score_names(abs(SCORE_TRANSPORT)) = "Transport Rate"
score_names(abs(SCORE_N_1N)) = "(n,1n) Rate"
score_names(abs(SCORE_ABSORPTION)) = "Absorption Rate"
score_names(abs(SCORE_FISSION)) = "Fission Rate"
Expand Down
38 changes: 0 additions & 38 deletions src/tally.F90
Original file line number Diff line number Diff line change
Expand Up @@ -346,30 +346,6 @@ subroutine score_general_ce(p, t, start_index, filter_index, i_nuclide, &
end if


case (SCORE_TRANSPORT)
! Only analog estimators are available.
! Skip any event where the particle didn't scatter
if (p % event /= EVENT_SCATTER) cycle SCORE_LOOP
! get material macros
macro_total = material_xs % total
macro_scatt = material_xs % total - material_xs % absorption
! Score total rate - p1 scatter rate Note estimator needs to be
! adjusted since tallying is only occuring when a scatter has
! happened. Effectively this means multiplying the estimator by
! total/scatter macro
score = (macro_total - p % mu * macro_scatt) * (ONE / macro_scatt)


case (SCORE_N_1N)
! Only analog estimators are available.
! Skip any event where the particle didn't scatter
if (p % event /= EVENT_SCATTER) cycle SCORE_LOOP
! Skip any events where weight of particle changed
if (p % wgt /= p % last_wgt) cycle SCORE_LOOP
! All events that reach this point are (n,1n) reactions
score = p % last_wgt


case (SCORE_ABSORPTION)
if (t % estimator == ESTIMATOR_ANALOG) then
if (survival_biasing) then
Expand Down Expand Up @@ -1021,20 +997,6 @@ subroutine score_general_mg(p, t, start_index, filter_index, i_nuclide, &
end if


case (SCORE_TRANSPORT)
! Only analog estimators are available.
! Skip any event where the particle didn't scatter
if (p % event /= EVENT_SCATTER) cycle SCORE_LOOP
! Score total rate - p1 scatter rate Note estimator needs to be
! adjusted since tallying is only occuring when a scatter has
! happened. Effectively this means multiplying the estimator by
! total/scatter macro
score = (material_xs % total - p % mu * material_xs % elastic)
if (material_xs % elastic /= ZERO) then
score = score / material_xs % elastic
end if


case (SCORE_ABSORPTION)
if (t % estimator == ESTIMATOR_ANALOG) then
if (survival_biasing) then
Expand Down
2 changes: 1 addition & 1 deletion tests/test_tallies/inputs_true.dat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0597eff3fddbc45a09b5b324c9704e540b694b07c136f2040426fdcfe5ec544f036073e4afa34a5fb0fbd721a4c0a609b9b68bf17ce4ec78302023b46b71930c
35e3e1a2c2ef7c707ea585e6cd697ea5e4ae8ec0ec070985dcfd1917a6a569cb7354bee7bbdd259ecdad7198823b4dad98b17452f9cba1122f22635e0aa0a046
2 changes: 1 addition & 1 deletion tests/test_tallies/results_true.dat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9f14aaa1694489032b3ce193ad29ecf6ac8976c88c2dd6b26d4c30ae88348e249a9b702b1d39c22204350b8f3bd689800c1b6a6003f19c7bdaf64084a209a2cc
264bc2cb19f7d81dfb1c326ee044f89cd09549b3b6836f334bb06f63bf586058e9825788a90ca7b84c77fd53ee23871727fd0d2b0139cb008192c533be4b84e3
2 changes: 1 addition & 1 deletion tests/test_tallies/test_tallies.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def _build_inputs(self):
total_tallies[3].estimator = 'collision'

questionable_tally = Tally()
questionable_tally.scores = ['transport', 'n1n']
questionable_tally.scores = ['n1n']

all_nuclide_tallies = [Tally(), Tally()]
for t in all_nuclide_tallies:
Expand Down

0 comments on commit ccc7da1

Please sign in to comment.