From 391e8b18058df84330a80db7cb2eb9797f6d800e Mon Sep 17 00:00:00 2001 From: Adam Nelson Date: Sat, 13 Feb 2016 05:18:19 -0500 Subject: [PATCH] previous commit changed library extension from example problem to 70m from 300K. This puts them back to being 300K and then adds size to the default_xs variable to allow for 5 total characters in the extension.' --- docs/source/usersguide/mgxs_library.rst | 9 ++++-- .../python/pincell_multigroup/build-xml.py | 10 +++--- examples/xml/pincell_multigroup/materials.xml | 4 +-- .../pincell_multigroup/mg_cross_sections.xml | 32 +++++++++---------- src/global.F90 | 4 +-- src/input_xml.F90 | 2 +- 6 files changed, 32 insertions(+), 29 deletions(-) diff --git a/docs/source/usersguide/mgxs_library.rst b/docs/source/usersguide/mgxs_library.rst index ae4ee6681..4cc36f1e8 100644 --- a/docs/source/usersguide/mgxs_library.rst +++ b/docs/source/usersguide/mgxs_library.rst @@ -83,10 +83,13 @@ attributes/sub-elements required to describe the meta-data: :name: The name of the microscopic or macroscopic data set. An extension to the - name must be provided (e.g., the ``.70m`` in ``UO2.70m``). This extension, + name must be provided (e.g., the ``.300K`` in ``UO2.300K``). The name and + extension together must be twelve or less characters in length. This + extension must follow a period and be five characters or less in length. similar to the equivalent in the continuous-energy ``cross_sections.xml`` - file is used to denote variants of the particular nuclide or material of - interest (i.e. the ``UO2`` in this example). + file, is used to denote variants of the particular nuclide or material of + interest (i.e. the ``UO2`` data in this example could have been generated + at a temperature of 300K). *Default*: None, this must be provided. diff --git a/examples/python/pincell_multigroup/build-xml.py b/examples/python/pincell_multigroup/build-xml.py index 7b8926c34..ff75a64d9 100644 --- a/examples/python/pincell_multigroup/build-xml.py +++ b/examples/python/pincell_multigroup/build-xml.py @@ -22,7 +22,7 @@ groups = openmc.mgxs.EnergyGroups(group_edges=[1E-11, 0.0635E-6, 10.0E-6, 1.0E-4, 1.0E-3, 0.5, 1.0, 20.0]) # Instantiate the 7-group (C5G7) cross section data -uo2_xsdata = openmc.XSdata('UO2.70m', groups) +uo2_xsdata = openmc.XSdata('UO2.300K', groups) uo2_xsdata.order = 0 uo2_xsdata.total = np.array([0.1779492, 0.3298048, 0.4803882, 0.5543674, 0.3118013, 0.3951678, 0.5644058]) @@ -45,7 +45,7 @@ uo2_xsdata.nu_fission = np.array([2.005998E-02, 2.027303E-03, 1.570599E-02, uo2_xsdata.chi = np.array([5.8791E-01, 4.1176E-01, 3.3906E-04, 1.1761E-07, 0.0000E+00, 0.0000E+00, 0.0000E+00]) -h2o_xsdata = openmc.XSdata('LWTR.70m', groups) +h2o_xsdata = openmc.XSdata('LWTR.300K', groups) h2o_xsdata.order = 0 h2o_xsdata.total = np.array([0.15920605, 0.412969593, 0.59030986, 0.58435, 0.718, 1.2544497, 2.650379]) @@ -71,8 +71,8 @@ mg_cross_sections_file.export_to_xml() ############################################################################### # Instantiate some Macroscopic Data -uo2_data = openmc.Macroscopic('UO2', '70m') -h2o_data = openmc.Macroscopic('LWTR', '70m') +uo2_data = openmc.Macroscopic('UO2', '300K') +h2o_data = openmc.Macroscopic('LWTR', '300K') # Instantiate some Materials and register the appropriate Macroscopic objects uo2 = openmc.Material(material_id=1, name='UO2 fuel') @@ -85,7 +85,7 @@ water.add_macroscopic(h2o_data) # Instantiate a MaterialsFile, register all Materials, and export to XML materials_file = openmc.MaterialsFile() -materials_file.default_xs = '70m' +materials_file.default_xs = '300K' materials_file.add_materials([uo2, water]) materials_file.export_to_xml() diff --git a/examples/xml/pincell_multigroup/materials.xml b/examples/xml/pincell_multigroup/materials.xml index c94629665..696116654 100644 --- a/examples/xml/pincell_multigroup/materials.xml +++ b/examples/xml/pincell_multigroup/materials.xml @@ -1,7 +1,7 @@ - - 70m + + 300K diff --git a/examples/xml/pincell_multigroup/mg_cross_sections.xml b/examples/xml/pincell_multigroup/mg_cross_sections.xml index d38d2d9c2..3c671a192 100644 --- a/examples/xml/pincell_multigroup/mg_cross_sections.xml +++ b/examples/xml/pincell_multigroup/mg_cross_sections.xml @@ -11,8 +11,8 @@ --> - UO2.70m - UO2.70m + UO2.300K + UO2.300K 2.53E-8 0 true @@ -67,8 +67,8 @@ - MOX1.70m - MOX1.70m + MOX1.300K + MOX1.300K 2.53E-8 0 true @@ -124,8 +124,8 @@ - MOX2.70m - MOX2.70m + MOX2.300K + MOX2.300K 2.53E-8 0 true @@ -180,8 +180,8 @@ - MOX3.70m - MOX3.70m + MOX3.300K + MOX3.300K 2.53E-8 0 true @@ -236,8 +236,8 @@ - FC.70m - FC.70m + FC.300K + FC.300K 2.53E-8 0 true @@ -286,8 +286,8 @@ - GT.70m - GT.70m + GT.300K + GT.300K 2.53E-8 0 false @@ -318,8 +318,8 @@ - LWTR.70m - LWTR.70m + LWTR.300K + LWTR.300K 2.53E-8 0 false @@ -351,8 +351,8 @@ - CR.70m - CR.70m + CR.300K + CR.300K 2.53E-8 0 false diff --git a/src/global.F90 b/src/global.F90 index 17477ed80..970f89f9b 100644 --- a/src/global.F90 +++ b/src/global.F90 @@ -79,8 +79,8 @@ module global type(DictCharInt) :: nuclide_dict type(DictCharInt) :: xs_listing_dict - ! Default xs identifier (e.g. 70c) - character(3):: default_xs + ! Default xs identifier (e.g. 70c or 300K) + character(5):: default_xs ! ============================================================================ ! CONTINUOUS-ENERGY CROSS SECTION RELATED VARIABLES diff --git a/src/input_xml.F90 b/src/input_xml.F90 index 9fc490a33..eb504f43a 100644 --- a/src/input_xml.F90 +++ b/src/input_xml.F90 @@ -3072,7 +3072,7 @@ contains ! Append default_xs specifier to nuclide if needed if ((default_xs /= '') .and. (.not. ends_with(sarray(j), 'c'))) then - word = trim(word) // "." // default_xs + word = trim(word) // "." // trim(default_xs) end if ! Search through nuclides