diff --git a/openmc/material.py b/openmc/material.py index d922c685f9..15c0451872 100644 --- a/openmc/material.py +++ b/openmc/material.py @@ -634,8 +634,9 @@ class Material(object): element.set("name", str(self._name)) # Create temperature XML subelement - subelement = ET.SubElement(element, "temperature") - subelement.text = self.temperature + if len(self.temperature) > 0: + subelement = ET.SubElement(element, "temperature") + subelement.text = self.temperature # Create density XML subelement subelement = ET.SubElement(element, "density") diff --git a/src/input_xml.F90 b/src/input_xml.F90 index 5fc38c7419..8e48131932 100644 --- a/src/input_xml.F90 +++ b/src/input_xml.F90 @@ -1032,23 +1032,6 @@ contains nuclides_0K(i) % scheme) end if - ! check to make sure xs name for which method is applied is given - if (.not. check_for_node(node_scatterer, "xs_label")) then - call fatal_error("Must specify the temperature dependent name of & - &scatterer " // trim(to_str(i)) & - // " given in cross_sections.xml") - end if - call get_node_value(node_scatterer, "xs_label", & - nuclides_0K(i) % name) - - ! check to make sure 0K xs name for which method is applied is given - if (.not. check_for_node(node_scatterer, "xs_label_0K")) then - call fatal_error("Must specify the 0K name of scatterer " & - // trim(to_str(i)) // " given in cross_sections.xml") - end if - call get_node_value(node_scatterer, "xs_label_0K", & - nuclides_0K(i) % name_0K) - if (check_for_node(node_scatterer, "E_min")) then call get_node_value(node_scatterer, "E_min", & nuclides_0K(i) % E_min) @@ -1073,8 +1056,6 @@ contains nuclides_0K(i) % nuclide = trim(nuclides_0K(i) % nuclide) nuclides_0K(i) % scheme = to_lower(trim(nuclides_0K(i) % scheme)) - nuclides_0K(i) % name = trim(nuclides_0K(i) % name) - nuclides_0K(i) % name_0K = trim(nuclides_0K(i) % name_0K) end do else call fatal_error("No resonant scatterers are specified within the & @@ -2086,9 +2067,9 @@ contains ! Check that 0K nuclides are listed in the cross_sections.xml file if (allocated(nuclides_0K)) then do i = 1, size(nuclides_0K) - if (.not. library_dict % has_key(to_lower(nuclides_0K(i) % name_0K))) then + if (.not. library_dict % has_key(to_lower(nuclides_0K(i) % nuclide))) then call fatal_error("Could not find resonant scatterer " & - // trim(nuclides_0K(i) % name_0K) & + // trim(nuclides_0K(i) % nuclide) & // " in cross_sections.xml file!") end if end do @@ -5942,16 +5923,15 @@ contains type(Nuclide) :: resonant_nuc do i = 1, size(nuclides_0K) - if (nuc % name == nuclides_0K(i) % name) then + if (nuc % name == nuclides_0K(i) % nuclide) then ! Copy basic information from settings.xml nuc % resonant = .true. - nuc % name_0K = trim(nuclides_0K(i) % name_0K) nuc % scheme = trim(nuclides_0K(i) % scheme) nuc % E_min = nuclides_0K(i) % E_min nuc % E_max = nuclides_0K(i) % E_max ! Get index in libraries array - name = nuc % name_0K + name = nuc % name i_library = library_dict % get_key(to_lower(name)) call write_message('Reading ' // trim(name) // ' 0K data from ' // & diff --git a/src/nuclide_header.F90 b/src/nuclide_header.F90 index e7c6c48243..5b66a09bc2 100644 --- a/src/nuclide_header.F90 +++ b/src/nuclide_header.F90 @@ -106,10 +106,8 @@ module nuclide_header !=============================================================================== type Nuclide0K - character(10) :: nuclide ! name of nuclide, e.g. U-238 + character(10) :: nuclide ! name of nuclide, e.g. U238 character(16) :: scheme = 'ares' ! target velocity sampling scheme - character(10) :: name ! name of nuclide, e.g. 92235.03c - character(10) :: name_0K ! name of 0K nuclide, e.g. 92235.00c real(8) :: E_min = 0.01e-6_8 ! lower cutoff energy for res scattering real(8) :: E_max = 1000.0e-6_8 ! upper cutoff energy for res scattering end type Nuclide0K @@ -183,7 +181,7 @@ module nuclide_header subroutine nuclide_from_hdf5(this, group_id, temperature) class(Nuclide), intent(inout) :: this integer(HID_T), intent(in) :: group_id - character(6), intent(in) :: temperature + character(len=*), intent(in) :: temperature integer :: i integer :: Z @@ -246,9 +244,14 @@ module nuclide_header ! closest temperature my_temperature = temperatures(j) if (temperature /= my_temperature) then - call warning(trim(this % name) // " does not contain data at a & - &temperature of " // trim(temperature) // "; using the & - &nearest available temperature of " // trim(my_temperature)) + if (temperature == '0K') then + call fatal_error(trim(this % name) // " does not contain 0K data & + &needed for the resonance scattering options selected") + else + call warning(trim(this % name) // " does not contain data at a & + &temperature of " // trim(temperature) // "; using the & + &nearest available temperature of " // trim(my_temperature)) + end if end if kT_dset = open_dataset(kT_group, my_temperature) diff --git a/tests/test_multipole/inputs_true.dat b/tests/test_multipole/inputs_true.dat index f99b29e8ed..5498e68738 100644 --- a/tests/test_multipole/inputs_true.dat +++ b/tests/test_multipole/inputs_true.dat @@ -1 +1 @@ -54044104d26e9aa90abcdb62290b598bd6ef0d46c3a9e509726ae7b20a7155471edd3e942b71f07b5c855ac1e451d58913a2f43fa971a8c4d56e569ae3b401ed \ No newline at end of file +2ad86dbb798ab68b45ca535fed3bd848625e0a2b79c68d11db91b14c74b8a48ed4d0129de7e6f6b6b7e9cb47a55d45aadca5ef535dc8a18cb881dddfc74d0bbb \ No newline at end of file diff --git a/tests/test_resonance_scattering/inputs_true.dat b/tests/test_resonance_scattering/inputs_true.dat index fdfb2b84e3..a1149a1ba5 100644 --- a/tests/test_resonance_scattering/inputs_true.dat +++ b/tests/test_resonance_scattering/inputs_true.dat @@ -1 +1 @@ -a97844ec7ab45b9e8c1d5849c99414dfa1408956fd951fa783ffa99f78770cd4644a3fb5abe038b0f835ef233ccea2b014e8bd7448f06769944383035ef38ac6 \ No newline at end of file +647cb9773dea9e27ec53ecb5029ab983ecc15cdd5d9551185906a61529452f3966e2b72bcf04c6a09f66810c29934357085343ecc3b888268fae85a100a907e3 \ No newline at end of file diff --git a/tests/test_triso/inputs_true.dat b/tests/test_triso/inputs_true.dat index fb9d6893c0..3e29529450 100644 --- a/tests/test_triso/inputs_true.dat +++ b/tests/test_triso/inputs_true.dat @@ -1 +1 @@ -c844cc920677037d22e6075780ab3e419f6ded19ea08c6f205df1773caa1a0ee53c605b7794415a24d9f0dbf6bd21d40daa9fcc89497b2abccabb1a6c81a506c \ No newline at end of file +b59af664a4db28471fbf7a19514eb1d61c9c890d2bfa83d23ed186ad0f23d8fa2115fb56c18212476183bcab78622622d8394ba97a19e300e0ed84acecdce3ca \ No newline at end of file diff --git a/tests/test_volume_calc/inputs_true.dat b/tests/test_volume_calc/inputs_true.dat index c9515085a1..3a2d9c4747 100644 --- a/tests/test_volume_calc/inputs_true.dat +++ b/tests/test_volume_calc/inputs_true.dat @@ -1 +1 @@ -aeacdb4aabfdfba0ee06cb4e5b21e95c48b1db57cb1301a1798f9b2f37eb56032ea7e94d88d8eacd17988809059b2da2500c2496c2859e5b656b641440545722 \ No newline at end of file +8dc4641e35f7770b8297eab9f71080c62a1c9607f36f7671cc61d47e0714887dea2f4c2ee515b23f39c38b1ea256c695d7c4d0ad95f5d7497a52d15f2ead33a5 \ No newline at end of file