use_windowed_multipole --> temperature_multipole

This commit is contained in:
Sterling Harper 2016-10-07 14:19:17 -04:00
parent b68e3c12ac
commit 63b9543fc9
7 changed files with 41 additions and 50 deletions

View file

@ -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 <use_windowed_multipole> element must also be set to "true"
for windowed multipole functionality.
.. note:: The <temperature_multipole> element must also be set to "true" for
windowed multipole functionality.
``<max_order>`` 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 ``<use_windowed_multipole>`` 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 <multipole_library>` must also be available).
:ref:`temperature_treatment`).
*Default*: "nearest"
.. _temperature_multipole:
``<temperature_multipole>`` Element
-----------------------------------
The ``<temperature_multipole>`` 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:
``<temperature_tolerance>`` Element
@ -850,17 +860,6 @@ problem. It has the following attributes/sub-elements:
*Default*: None
``<use_windowed_multipole>`` Element
------------------------------------
The ``<use_windowed_multipole>`` 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
``<verbosity>`` Element
-----------------------

View file

@ -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):

View file

@ -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

View file

@ -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 <use_windowed_multipole> 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 <use_windowed_multipole> 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

View file

@ -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 }?
}

View file

@ -575,6 +575,11 @@
<data type="string"/>
</element>
</optional>
<optional>
<element name="temperature_multipole">
<data type="boolean"/>
</element>
</optional>
<optional>
<element name="temperature_tolerance">
<data type="double"/>
@ -816,10 +821,5 @@
</zeroOrMore>
</element>
</optional>
<optional>
<element name="use_windowed_multipole">
<data type="boolean"/>
</element>
</optional>
</interleave>
</element>

View file

@ -1 +1 @@
cab3356c163ceace74251d20cafc1b46f9fc3af428685cf5cea9964f5356d59a967468a14b3a2cd2ad3eea04b1d164b5daee8259f38be8ec5fb04fa7b4982830
2be927608035759f52a2ac88b2c84e28c06e0f7905187bfd4695fecd80f417e727d8879c52fe03253938f7aa0301061f72dce9b5ae46b8675049b5bc4d9525a0