From dc71fa291538507d35261c17abb07ff176c90cd7 Mon Sep 17 00:00:00 2001 From: samuelshaner Date: Thu, 13 Jul 2017 09:55:55 -0400 Subject: [PATCH] fixed assorted issues with heating scores --- scripts/openmc-get-photo-endf71 | 2 +- src/constants.F90 | 22 +++++++++++----------- src/cross_section.F90 | 6 +++--- src/endf.F90 | 6 ++++++ src/global.F90 | 1 - src/input_xml.F90 | 2 +- src/output.F90 | 2 -- src/photon_physics.F90 | 2 +- 8 files changed, 23 insertions(+), 20 deletions(-) diff --git a/scripts/openmc-get-photo-endf71 b/scripts/openmc-get-photo-endf71 index 7fd06a0a2..9920b27e2 100755 --- a/scripts/openmc-get-photo-endf71 +++ b/scripts/openmc-get-photo-endf71 @@ -14,7 +14,7 @@ import openmc.data from openmc.data import ATOMIC_SYMBOL description = """ -Download ENDF/B-VII.1 ENDF data from IAEA for photo-atomic and atomic +Download ENDF/B-VII.1 ENDF data from NNDC for photo-atomic and atomic relaxation data and convert it to an HDF5 library for use with OpenMC. This data is used for photon transport in OpenMC. diff --git a/src/constants.F90 b/src/constants.F90 index c04ecf1b2..bb0649722 100644 --- a/src/constants.F90 +++ b/src/constants.F90 @@ -343,18 +343,18 @@ module constants SCORE_INVERSE_VELOCITY = -21, & ! flux-weighted inverse velocity SCORE_HEATING = -22, & ! prompt fission Q-value SCORE_FISS_Q_RECOV = -23, & ! recoverable fission Q-value - SCORE_FISS_Q_PROMPT = -24, & ! recoverable fission Q-value - SCORE_FISS_Q_PROMPT_NEUTRONS = -25, & ! recoverable fission Q-value + SCORE_FISS_Q_PROMPT = -24, & ! prompt fission Q-value + SCORE_FISS_Q_PROMPT_NEUTRONS = -25, & ! recoverable fission Q-value SCORE_FISS_Q_DELAYED_NEUTRONS = -26, & ! recoverable fission Q-value - SCORE_FISS_Q_FRAGMENTS = -27, & ! recoverable fission Q-value - SCORE_FISS_Q_BETAS = -28, & ! recoverable fission Q-value - SCORE_FISS_Q_PROMPT_PHOTONS = -29, & ! recoverable fission Q-value - SCORE_FISS_Q_DELAYED_PHOTONS = -30, & ! recoverable fission Q-value - SCORE_FISS_Q_NEUTRINOS = -31, & ! recoverable fission Q-value - SCORE_Q_PHOTONS = -32, & ! recoverable fission Q-value - SCORE_Q_ELECTRONS = -33, & ! recoverable fission Q-value - SCORE_Q_POSITRONS = -34, & ! recoverable fission Q-value - SCORE_Q_ELASTIC = -35, & ! recoverable fission Q-value + SCORE_FISS_Q_FRAGMENTS = -27, & ! fission fragments Q-value + SCORE_FISS_Q_BETAS = -28, & ! fission betas Q-value + SCORE_FISS_Q_PROMPT_PHOTONS = -29, & ! fission prompt photons Q-value + SCORE_FISS_Q_DELAYED_PHOTONS = -30, & ! fission delayed phtons Q-value + SCORE_FISS_Q_NEUTRINOS = -31, & ! fission neutrinos Q-value + SCORE_Q_PHOTONS = -32, & ! photon energy deposition + SCORE_Q_ELECTRONS = -33, & ! electron energy deposition + SCORE_Q_POSITRONS = -34, & ! positron energy deposition + SCORE_Q_ELASTIC = -35, & ! elastic scattering energy deposition SCORE_DECAY_RATE = -36 ! delayed neutron precursor decay rate ! Maximum scattering order supported diff --git a/src/cross_section.F90 b/src/cross_section.F90 index 325f1ed84..37a376845 100644 --- a/src/cross_section.F90 +++ b/src/cross_section.F90 @@ -261,9 +261,9 @@ contains micro_xs(i_nuclide) % interp_factor = f ! Initialize nuclide cross-sections to zero - micro_xs(i_nuclide) % fission = ZERO - micro_xs(i_nuclide) % nu_fission = ZERO - micro_xs(i_nuclide) % photon_prod = ZERO + micro_xs(i_nuclide) % fission = ZERO + micro_xs(i_nuclide) % nu_fission = ZERO + micro_xs(i_nuclide) % photon_prod = ZERO ! Calculate microscopic nuclide total cross section micro_xs(i_nuclide) % total = (ONE - f) * xs % total(i_grid) & diff --git a/src/endf.F90 b/src/endf.F90 index e34ce3671..f67b231c1 100644 --- a/src/endf.F90 +++ b/src/endf.F90 @@ -70,6 +70,12 @@ contains string = "fission-q-fragments" case (SCORE_FISS_Q_BETAS) string = "fission-q-betas" + case (SCORE_FISS_Q_PROMPT_PHOTONS) + string = "fission-q-prompt-photons" + case (SCORE_FISS_Q_DELAYED_PHOTONS) + string = "fission-q-delayed-photons" + case (SCORE_FISS_Q_NEUTRINOS) + string = "fission-q-neutrinos" case (SCORE_Q_ELASTIC) string = "q-elastic" case (SCORE_Q_PHOTONS) diff --git a/src/global.F90 b/src/global.F90 index 28ff57cc6..30d824a6d 100644 --- a/src/global.F90 +++ b/src/global.F90 @@ -59,7 +59,6 @@ module global type(DictIntInt) :: lattice_dict type(DictIntInt) :: surface_dict type(DictIntInt) :: material_dict - type(DictIntInt) :: particle_dict type(DictIntInt) :: mesh_dict type(DictIntInt) :: filter_dict type(DictIntInt) :: tally_dict diff --git a/src/input_xml.F90 b/src/input_xml.F90 index 82cbbe663..6f3c9be71 100644 --- a/src/input_xml.F90 +++ b/src/input_xml.F90 @@ -285,7 +285,7 @@ contains if (check_for_node(root, "photon_transport")) then call get_node_value(root, "photon_transport", photon_transport) - if (.not. run_CE) then + if (.not. run_CE .and. photon_transport) then call fatal_error("Photon transport is not currently supported & &in Multi-group mode") end if diff --git a/src/output.F90 b/src/output.F90 index 14e69ac51..7acd303fd 100644 --- a/src/output.F90 +++ b/src/output.F90 @@ -916,7 +916,6 @@ contains indent = indent + 2 k = 0 - do l = 1, t % n_user_score_bins k = k + 1 score_index = score_index + 1 @@ -972,7 +971,6 @@ contains end select end associate end do - indent = indent - 2 end do diff --git a/src/photon_physics.F90 b/src/photon_physics.F90 index 3ce47c0da..7d4809803 100644 --- a/src/photon_physics.F90 +++ b/src/photon_physics.F90 @@ -305,10 +305,10 @@ contains integer :: secondary real(8) :: c real(8) :: rn + real(8) :: E real(8) :: mu real(8) :: phi real(8) :: uvw(3) - real(8) :: E ! If no transitions, assume fluorescent photon from captured free electron if (elm % shells(i_shell) % n_transitions == 0) then