mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 13:45:36 -04:00
Revising with develop with its latest th5 merge
This commit is contained in:
commit
6cf7f7fa48
31 changed files with 29 additions and 66 deletions
|
|
@ -758,12 +758,10 @@ a material default temperature.
|
|||
The ``<temperature_method>`` element has an accepted value of "nearest" or
|
||||
"interpolation". A value of "nearest" indicates that for each 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 interpolated between temperatures at
|
||||
which nuclear data are present. A value of "multipole" indicates that the
|
||||
windowed multipole method should be used to evaluate temperature-dependent cross
|
||||
sections in the resolved resonance range (a :ref:`windowed multipole library
|
||||
<multipole_library>` must also be available).
|
||||
tolerance (see :ref:`temperature_tolerance`). A value of "multipole" indicates
|
||||
that the windowed multipole method should be used to evaluate
|
||||
temperature-dependent cross sections in the resolved resonance range (a
|
||||
:ref:`windowed multipole library <multipole_library>` must also be available).
|
||||
|
||||
*Default*: "nearest"
|
||||
|
||||
|
|
|
|||
|
|
@ -23,8 +23,7 @@ if sys.version_info[0] >= 3:
|
|||
|
||||
|
||||
def _get_metadata(zaid, metastable_scheme='nndc'):
|
||||
"""Method to obtain the complete element name, element, Z, mass_number,
|
||||
and metastable state
|
||||
"""Return basic identifying data for a nuclide with a given ZAID.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
|
|
@ -283,8 +282,7 @@ class IncidentNeutron(EqualityMixin):
|
|||
self._urr = urr
|
||||
|
||||
def add_temperature_from_ace(self, ace_or_filename, metastable_scheme='nndc'):
|
||||
"""Add data to the IncidentNeutron object from an ACE file at a
|
||||
different temperature.
|
||||
"""Append data from an ACE file at a different temperature.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
|
|
|
|||
|
|
@ -226,7 +226,7 @@ class ThermalScattering(EqualityMixin):
|
|||
# Write basic data
|
||||
g = f.create_group(self.name)
|
||||
g.attrs['atomic_weight_ratio'] = self.atomic_weight_ratio
|
||||
g.attrs['nuclides'] = np.string_(self.nuclides)
|
||||
g.attrs['nuclides'] = np.array(self.nuclides, dtype='S')
|
||||
g.attrs['secondary_mode'] = np.string_(self.secondary_mode)
|
||||
ktg = g.create_group('kTs')
|
||||
for i, temperature in enumerate(self.temperatures):
|
||||
|
|
|
|||
|
|
@ -724,32 +724,14 @@ class Materials(cv.CheckedList):
|
|||
materials : Iterable of openmc.Material
|
||||
Materials to add to the collection
|
||||
|
||||
Attributes
|
||||
----------
|
||||
default_temperature : str
|
||||
The default temperature identifier applied to a material when none is
|
||||
specified. The units are in Kelvin and the temperature rounded to the
|
||||
nearest integer. For example, a tempreature of 293.6K would be
|
||||
provided as '294K'
|
||||
|
||||
"""
|
||||
|
||||
def __init__(self, materials=None):
|
||||
super(Materials, self).__init__(Material, 'materials collection')
|
||||
self._default_temperature = None
|
||||
self._materials_file = ET.Element("materials")
|
||||
if materials is not None:
|
||||
self += materials
|
||||
|
||||
@property
|
||||
def default_temperature(self):
|
||||
return self._default_temperature
|
||||
|
||||
@default_temperature.setter
|
||||
def default_temperature(self, temperature):
|
||||
cv.check_type('default_temperature', temperature, basestring)
|
||||
self._default_temperature = temperature
|
||||
|
||||
def add_material(self, material):
|
||||
"""Append material to collection
|
||||
|
||||
|
|
@ -831,11 +813,6 @@ class Materials(cv.CheckedList):
|
|||
material.make_isotropic_in_lab()
|
||||
|
||||
def _create_material_subelements(self):
|
||||
if self._default_temperature is not None:
|
||||
subelement = ET.SubElement(self._materials_file,
|
||||
"default_temperature")
|
||||
subelement.text = self._default_temperature
|
||||
|
||||
for material in self:
|
||||
xml_element = material.get_material_xml()
|
||||
self._materials_file.append(xml_element)
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ class Settings(object):
|
|||
temperatures at which nuclear data doesn't exist. Accepted keys are
|
||||
'default', 'method', and 'tolerance'. The value for 'default' should be
|
||||
a float representing the default temperature in Kelvin. The value for
|
||||
'method' should be 'nearest' or 'interpolation'. If the method is
|
||||
'method' should be 'nearest' or 'multipole'. If the method is
|
||||
'nearest', 'tolerance' indicates a range of temperature within which
|
||||
cross sections may be used.
|
||||
trigger_active : bool
|
||||
|
|
|
|||
|
|
@ -2518,7 +2518,6 @@ contains
|
|||
call h5aget_type_f(attr_id, filetype, hdf5_err)
|
||||
call h5tget_size_f(filetype, size, hdf5_err)
|
||||
if (size > len(buffer(1)) + 1) then
|
||||
print *, size, len(buffer(1))
|
||||
call fatal_error("Character buffer is not long enough to &
|
||||
&read HDF5 string array.")
|
||||
end if
|
||||
|
|
|
|||
|
|
@ -194,7 +194,6 @@ module nuclide_header
|
|||
real(8), intent(in) :: tolerance
|
||||
|
||||
integer :: i
|
||||
integer :: n
|
||||
integer :: storage_type
|
||||
integer :: max_corder
|
||||
integer :: n_links
|
||||
|
|
@ -203,7 +202,7 @@ module nuclide_header
|
|||
integer :: n_temperature
|
||||
integer(HID_T) :: urr_group, nu_group
|
||||
integer(HID_T) :: energy_group, energy_dset
|
||||
integer(HID_T) :: kT_group, kT_dset
|
||||
integer(HID_T) :: kT_group
|
||||
integer(HID_T) :: rxs_group
|
||||
integer(HID_T) :: rx_group
|
||||
integer(HID_T) :: total_nu
|
||||
|
|
|
|||
|
|
@ -87,7 +87,6 @@ contains
|
|||
real(8), intent(in) :: tolerance
|
||||
|
||||
integer :: i, j
|
||||
integer :: n
|
||||
integer :: t
|
||||
integer :: n_energy, n_energy_out, n_mu
|
||||
integer :: i_closest
|
||||
|
|
@ -98,7 +97,7 @@ contains
|
|||
integer(HID_T) :: elastic_group
|
||||
integer(HID_T) :: inelastic_group
|
||||
integer(HID_T) :: dset_id
|
||||
integer(HID_T) :: kT_group, kT_dset
|
||||
integer(HID_T) :: kT_group
|
||||
integer(HSIZE_T) :: dims2(2)
|
||||
integer(HSIZE_T) :: dims3(3)
|
||||
real(8), allocatable :: temp(:,:)
|
||||
|
|
|
|||
|
|
@ -271,7 +271,6 @@ class InputSet(object):
|
|||
bot_fa.add_s_alpha_beta('c_H_in_H2O')
|
||||
|
||||
# Define the materials file.
|
||||
self.materials.default_temperature = '294K'
|
||||
self.materials += (fuel, clad, cold_water, hot_water, rpv_steel,
|
||||
lower_rad_ref, upper_rad_ref, bot_plate,
|
||||
bot_nozzle, top_nozzle, top_fa, bot_fa)
|
||||
|
|
@ -615,7 +614,6 @@ class PinCellInputSet(object):
|
|||
hot_water.add_s_alpha_beta('c_H_in_H2O')
|
||||
|
||||
# Define the materials file.
|
||||
self.materials.default_temperature = '294K'
|
||||
self.materials += (fuel, clad, hot_water)
|
||||
|
||||
# Instantiate ZCylinder surfaces
|
||||
|
|
@ -717,7 +715,6 @@ class AssemblyInputSet(object):
|
|||
hot_water.add_s_alpha_beta('c_H_in_H2O')
|
||||
|
||||
# Define the materials file.
|
||||
self.materials.default_temperature = '294K'
|
||||
self.materials += (fuel, clad, hot_water)
|
||||
|
||||
# Instantiate ZCylinder surfaces
|
||||
|
|
@ -845,7 +842,6 @@ class MGInputSet(InputSet):
|
|||
water.add_macroscopic(water_data)
|
||||
|
||||
# Define the materials file.
|
||||
self.materials.default_temperature = '294K'
|
||||
self.materials += (uo2, clad, water)
|
||||
|
||||
# Define surfaces.
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
7b62ec28ffec0028dc07ed23b720ae3f97b00aa15b319dc3991d9f1f88fcae8bffc7ccd2385d2b848180a57120624061ff4fe10745a3187e3e64fee0faface8d
|
||||
dfb59bace10a91bb7ffc871d8ee87e91d94754bb8bb002ac6088f80fe0f480741c0489f74b753fc37158d0ff0f1368739ea60638b42083791311eefeac79168e
|
||||
|
|
@ -1 +1 @@
|
|||
dd0b1228d264dd3c24ca3082de9839080f727a137c77bed74b7637cc16d1564ce7500e3bb61a88224926f1d837079702f304247efdf9e52dedf779e17cd14550
|
||||
6ae54c198e7659503d297e40be746a5bd72b35909fceed4b3ef357876b781946c0ea5021342556ef21f4034fa9e42b2c6014077c0efd3459dc063e6da4b12b59
|
||||
|
|
@ -29,7 +29,6 @@ class DistribmatTestHarness(PyAPITestHarness):
|
|||
light_fuel.add_nuclide('U235', 1.0)
|
||||
|
||||
mats_file = openmc.Materials([moderator, dense_fuel, light_fuel])
|
||||
mats_file.default_temperature = '294K'
|
||||
mats_file.export_to_xml()
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
a84e601e6ba0891aaeaa37b1aa55076fecee598bb46be2b99dcdedab597b5d7e1731e2a0dc265df2ad6f475e33dae91a3cc27bc23d0c37be25a097ea83e74fd6
|
||||
4b3d0270a479e65579b305d1c2339b76971790bc7371c685efa6e2d341980fec301cf0859c34796ae04ae98aa01ab8b4905a8d8a3a916895c36d82ca6b58fb39
|
||||
|
|
@ -1 +1 @@
|
|||
ed4d8a6c1a00d4dad10bc5522bf42d0c7a13ef5f86fc93a3f249e77681cda4424ce8879919015b05272c276ffea41e3aecef882592e8dbd97085273a356fb630
|
||||
ed4d8a6c1a00d4dad10bc5522bf42d0c7a13ef5f86fc93a3f249e77681cda4424ce8879919015b05272c276ffea41e3aecef882592e8dbd97085273a356fb630
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
34af3b6ee8f65c6257d85a7c9594bc9bbabdabcb055e42bf6dd3ebfc0e41503367674223093363798950524e04f4377eae80f6d535301e55d268ff0c74e4261f
|
||||
34af3b6ee8f65c6257d85a7c9594bc9bbabdabcb055e42bf6dd3ebfc0e41503367674223093363798950524e04f4377eae80f6d535301e55d268ff0c74e4261f
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
a33f770307b365103c5d71aa3e70deebd78d3a2fa90e88632641c1a40d64d19de0ce3c95c858aedf3beccc5de64cac434e1cd55b2b162ed315c78450c53a24a4
|
||||
5c35e26926a43abf3ddcf782b09d96ce82d447a7db9ee9994c0aa811e431f8c06c11ce022c2a6ccf8d5f79f1cdedee2e8c20ca6d1e7cc5129ebcfae9568b2f87
|
||||
|
|
@ -1 +1 @@
|
|||
df2e5370925785e061e094561e9d2048c3104aaecf533ee9590a187d4597e53b489fb6e8cc54ed878f7d313bcf00586edceae4ff712c837faaa5ddab0ad378b3
|
||||
2b2a2f5778b03f87d20fa6da96cc19db0489f69d4d5f0cac02dd407fd8e53a082081bfef35c4310cb2e0651254766d499e89279e711fd6fd93f913c964855839
|
||||
|
|
@ -1 +1 @@
|
|||
687358da3e7d658b6187e1d76280437d5b1a97a7ca3920483792e74de6fa9556fa86f4d55150c03d8628b3aa424afa187d8745f087f252ad0fca44ccc2a85f4c
|
||||
ad427594bd8a68ad35382bc34b5932e7c78480b6e327caf63782d563fd6e6e5fb4e7b0dfd9094394a5db092f789c473dbb08cb6b3d0c0296edcfc247dbe95d6f
|
||||
|
|
@ -1 +1 @@
|
|||
df2e5370925785e061e094561e9d2048c3104aaecf533ee9590a187d4597e53b489fb6e8cc54ed878f7d313bcf00586edceae4ff712c837faaa5ddab0ad378b3
|
||||
2b2a2f5778b03f87d20fa6da96cc19db0489f69d4d5f0cac02dd407fd8e53a082081bfef35c4310cb2e0651254766d499e89279e711fd6fd93f913c964855839
|
||||
|
|
@ -1 +1 @@
|
|||
7f3aec9cedab76262de3706427ccba88b4c81fd4c9a033ff5467671ca21abe13b3981100d688502818bdd0534db22438970b02d652ca9d105557276de2d2a550
|
||||
68c7695d7ae0367c59155eab05d3fe859cae895170f2cd32d4463af340a9a2035be16221b1eda8e2a1132bfe1b8163ca8d964fb1b23274c232fb10fd88274aea
|
||||
|
|
@ -1 +1 @@
|
|||
df2e5370925785e061e094561e9d2048c3104aaecf533ee9590a187d4597e53b489fb6e8cc54ed878f7d313bcf00586edceae4ff712c837faaa5ddab0ad378b3
|
||||
2b2a2f5778b03f87d20fa6da96cc19db0489f69d4d5f0cac02dd407fd8e53a082081bfef35c4310cb2e0651254766d499e89279e711fd6fd93f913c964855839
|
||||
|
|
@ -1 +1 @@
|
|||
332fd9ff1ca576410ffc6c0f3f03c00618fc863509dc3725f2f3a82134e2400de9c1edf2adc68cb8bce528789094f8eb468371e65cbc13efe76d76467ef291d9
|
||||
63f6f8ae24e0d8e23731c903a59e3f5e0edff730933ef6f8836ebf78949db75542c5794a6486c27016ad22e4375b8a18092cd1d1e025162afd01936cac2f205b
|
||||
|
|
@ -1 +1 @@
|
|||
f427510feb8a63ee2246613e65c9e9a488b6b7df11ce5f5ab0c61b23f299e150a27068ee110f77c64b5bb82882b6d0a428e06de681df2bd83facb9ebc46fb54c
|
||||
259ea7c22920ddea0bc076ee77d35e76f36d2c7043cb8d036b182a11fd7d0f6524e3cbd9c6b0bf4a1af905ebe10b765d3d43e43e899d3edbb601baf6fd172365
|
||||
|
|
@ -1 +1 @@
|
|||
11adb9111f20950e28b1c1929ee4ca0c9a6b2524de89bef44a495b2fe8cda3a2acac9e87d64ddb5eba591c8d22289956cb1f024d31e05da3c9a4162b8c589d85
|
||||
96d2f92c6017e62d688e3ca245c2ff7904a92816d188d096829440cd8fcfd4f8639dc67c12d54b324081c19e1c7dd2e79c1caeac53d7826399f11766826d5410
|
||||
|
|
@ -1 +1 @@
|
|||
bc17ba12ee5de7e6b0226e589be9044af725ff4e27683b765a9c75e5629176b5ca51d1e0306028ae90185d64644babf9ac22e4753f092b4b836790f4e162f9d0
|
||||
4a4e481b9af3612c71bdc93245011555807061bbd9d9be4c5b399f2c38820d38d9ce3ac6255d045415a216737eac65fb0f0b6e331e49b90bf8edc814d0f2f0e8
|
||||
|
|
@ -1 +1 @@
|
|||
6b59ea3a0dc0d25c590f724b8c051a54e8d7836467ba31b7da72b0574398e6c73160a180524952ea983b0e7a7de776d2d7102d280d5a4e7e3624bd76f6f42a09
|
||||
6747131dad4c1efd8c87d857ce9127cb16ec883fdf5fabe309d82732d47851424273e9ad4878a335555d8b25bb0c0a15e68ac30e355ae346e9885c499e9ec979
|
||||
|
|
@ -1 +1 @@
|
|||
6d9ebab08ccce003e6128c6346ffd80e69a957fab15e9a0e211771efa68b24f276e62781f8471c72072f9017380d7e821c38002c03689993efed45db9590c039
|
||||
144dd4059444fad5e2e4fa20681fbdc74c0e5cbf3265104a0b49d87c768798eaeb25e3c6c795bcac2eebdde784c51588006d62c9f25be96dda5c51011a76b7c1
|
||||
|
|
@ -1 +1 @@
|
|||
033b09236ffceab5f0f7860d4926e0a66f328c6dd6fa48b28d6237278d42f9e06a28f2368f273773e417b8177705bc9a5e3ef67335734e5f17ff9843b72a2357
|
||||
b22973093e2b0690b30fb1262a11e27004555b796c446d256cb58a1d7329888ab60c1b93729b3d74bb015b98aa434416daa2dc2aee526eb8df0e9052911f94b4
|
||||
|
|
@ -93,7 +93,6 @@ class TRISOTestHarness(PyAPITestHarness):
|
|||
settings.export_to_xml()
|
||||
|
||||
mats = openmc.Materials([fuel, porous_carbon, ipyc, sic, opyc, graphite])
|
||||
mats.default_temperature = '294K'
|
||||
mats.export_to_xml()
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
8dc4641e35f7770b8297eab9f71080c62a1c9607f36f7671cc61d47e0714887dea2f4c2ee515b23f39c38b1ea256c695d7c4d0ad95f5d7497a52d15f2ead33a5
|
||||
382404d3061d2c847c87654ab12594ba3fbb7e3a82327da872b5fe2029018ef4d5d3376fceba5c2229ea6f85e1fb63650caf54baed3f3b0304137fde61a98d63
|
||||
|
|
@ -24,7 +24,6 @@ class VolumeTest(PyAPITestHarness):
|
|||
fuel.set_density('g/cc', 4.5)
|
||||
|
||||
materials = openmc.Materials((water, fuel))
|
||||
materials.default_temperature = '294K'
|
||||
materials.export_to_xml()
|
||||
|
||||
cyl = openmc.ZCylinder(1, R=1.0, boundary_type='vacuum')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue