diff --git a/docs/source/usersguide/input.rst b/docs/source/usersguide/input.rst index 2e4d3f087b..847dc66fff 100644 --- a/docs/source/usersguide/input.rst +++ b/docs/source/usersguide/input.rst @@ -292,8 +292,8 @@ OpenMC can use it for on-the-fly Doppler-broadening of resolved resonance range cross sections. If this element is absent from the settings.xml file, the :envvar:`OPENMC_MULTIPOLE_LIBRARY` environment variable will be used. - .. note:: The element must also be set to "true" - for windowed multipole functionality. + .. note:: The element must also be set to "true" for + windowed multipole functionality. ```` Element --------------------------- @@ -731,13 +731,23 @@ cell, the nearest temperature at which cross sections are given is to be applied, within a given tolerance (see :ref:`temperature_tolerance`). A value of "interpolation" indicates that cross sections are to be linear-linear interpolated between temperatures at which nuclear data are present (see -:ref:`temperature_treatment`). Note that if ```` is set -true, then for which multipole data is available will use the windowed multipole -method for cross sections in the resolved resonance range. (a -:ref:`windowed multipole library ` must also be available). +:ref:`temperature_treatment`). *Default*: "nearest" +.. _temperature_multipole: + +```` Element +----------------------------------- + +The ```` element toggles the windowed multipole +capability on or off. If this element is set to "True" and the relevant data is +available, OpenMC will use the windowed multipole method to evaluate and Doppler +broaden cross sections in the resolved resonance range. This override other +methods like "nearest" and "interpolation" in the resolved resonance range. + + *Default*: False + .. _temperature_tolerance: ```` Element @@ -850,17 +860,6 @@ problem. It has the following attributes/sub-elements: *Default*: None - -```` Element ------------------------------------- - -The ```` element toggles the windowed multipole -capability on or off. If this element is set to "True" and the relevant data is -available, OpenMC will use the windowed multipole method to evaluate and Doppler -broaden cross sections in the resolved resonance range. - - *Default*: False - ```` Element ----------------------- diff --git a/openmc/settings.py b/openmc/settings.py index 5019980ebd..84fe20485d 100644 --- a/openmc/settings.py +++ b/openmc/settings.py @@ -1054,12 +1054,8 @@ class Settings(object): def _create_temperature_subelements(self): if self.temperature: for key, value in self.temperature.items(): - if (key == 'multipole'): - element = ET.SubElement(self._settings_file, - "use_windowed_multipole") - else: - element = ET.SubElement(self._settings_file, - "temperature_{}".format(key)) + element = ET.SubElement(self._settings_file, + "temperature_{}".format(key)) element.text = str(value) def _create_threads_subelement(self): diff --git a/src/global.F90 b/src/global.F90 index d424e1cecd..c41ab52c07 100644 --- a/src/global.F90 +++ b/src/global.F90 @@ -99,11 +99,9 @@ module global ! What to assume for expanding natural elements integer :: default_expand = ENDF_BVII1 - ! Whether or not windowed multipole cross sections should be used. - logical :: multipole_active = .false. - ! Default temperature and method for choosing temperatures integer :: temperature_method = TEMPERATURE_NEAREST + logical :: temperature_multipole = .false. real(8) :: temperature_tolerance = 10.0_8 real(8) :: temperature_default = 293.6_8 diff --git a/src/input_xml.F90 b/src/input_xml.F90 index 74b5f47ae9..8691a9d5c3 100644 --- a/src/input_xml.F90 +++ b/src/input_xml.F90 @@ -1063,20 +1063,6 @@ contains end select end if - ! Check to see if windowed multipole functionality is requested - if (check_for_node(doc, "use_windowed_multipole")) then - call get_node_value(doc, "use_windowed_multipole", temp_str) - select case (to_lower(temp_str)) - case ('true', '1') - multipole_active = .true. - case ('false', '0') - multipole_active = .false. - case default - call fatal_error("Unrecognized value for in & - &settings.xml") - end select - end if - call get_node_list(doc, "volume_calc", node_vol_list) n = get_list_size(node_vol_list) allocate(volume_calcs(n)) @@ -1103,6 +1089,18 @@ contains if (check_for_node(doc, "temperature_tolerance")) then call get_node_value(doc, "temperature_tolerance", temperature_tolerance) end if + if (check_for_node(doc, "temperature_multipole")) then + call get_node_value(doc, "temperature_multipole", temp_str) + select case (to_lower(temp_str)) + case ('true', '1') + temperature_multipole = .true. + case ('false', '0') + temperature_multipole = .false. + case default + call fatal_error("Unrecognized value for in & + &settings.xml") + end select + end if ! Close settings XML file call close_xmldoc(doc) @@ -5798,7 +5796,7 @@ contains call already_read % add(name) ! Read multipole file into the appropriate entry on the nuclides array - if (multipole_active) call read_multipole_data(i_nuclide) + if (temperature_multipole) call read_multipole_data(i_nuclide) end if ! Check if material is fissionable @@ -5852,7 +5850,7 @@ contains end do ! If the user wants multipole, make sure we found a multipole library. - if (multipole_active) then + if (temperature_multipole) then mp_found = .false. do i = 1, size(nuclides) if (nuclides(i) % mp_present) then diff --git a/src/relaxng/settings.rnc b/src/relaxng/settings.rnc index 70550a40f7..b05ab7d6b5 100644 --- a/src/relaxng/settings.rnc +++ b/src/relaxng/settings.rnc @@ -132,6 +132,8 @@ element settings { element temperature_method { xsd:string }? & + element temperature_multipole { xsd:boolean }? & + element temperature_tolerance { xsd:double }? & element threads { xsd:positiveInteger }? & @@ -182,6 +184,4 @@ element settings { attribute E_max { xsd:double })? }* }? & - - element use_windowed_multipole { xsd:boolean }? } diff --git a/src/relaxng/settings.rng b/src/relaxng/settings.rng index 246c78e68d..cbeac25a51 100644 --- a/src/relaxng/settings.rng +++ b/src/relaxng/settings.rng @@ -575,6 +575,11 @@ + + + + + @@ -816,10 +821,5 @@ - - - - - diff --git a/tests/test_multipole/inputs_true.dat b/tests/test_multipole/inputs_true.dat index 9ff8c6e39f..3b2b43ec73 100644 --- a/tests/test_multipole/inputs_true.dat +++ b/tests/test_multipole/inputs_true.dat @@ -1 +1 @@ -cab3356c163ceace74251d20cafc1b46f9fc3af428685cf5cea9964f5356d59a967468a14b3a2cd2ad3eea04b1d164b5daee8259f38be8ec5fb04fa7b4982830 \ No newline at end of file +2be927608035759f52a2ac88b2c84e28c06e0f7905187bfd4695fecd80f417e727d8879c52fe03253938f7aa0301061f72dce9b5ae46b8675049b5bc4d9525a0 \ No newline at end of file