mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 21:55:41 -04:00
Now using a "data" descriptor rather than "ace" for the nuclide/element scattering XML tag
This commit is contained in:
parent
4db72c90af
commit
baa0b4c10c
5 changed files with 19 additions and 19 deletions
|
|
@ -1137,9 +1137,9 @@ Each ``material`` element can have the following attributes or sub-elements:
|
|||
be given in atom percent. The same applies for weight percentages.
|
||||
|
||||
An optional attribute/sub-element for each nuclide is ``scattering``. This
|
||||
attribute may be set to "ace" to use the scattering laws specified in the
|
||||
ACE files (default). Alternatively, when set to "iso-in-lab", the ACE
|
||||
scattering laws are used to sample the outgoing energy but an
|
||||
attribute may be set to "data" to use the scattering laws specified by the
|
||||
cross section library (default). Alternatively, when set to "iso-in-lab",
|
||||
the scattering laws are used to sample the outgoing energy but an
|
||||
isotropic-in-lab distribution is used to sample the outgoing angle at each
|
||||
scattering interaction. The ``scattering`` attribute may be most useful
|
||||
when using OpenMC to compute multi-group cross-sections for deterministic
|
||||
|
|
@ -1172,9 +1172,9 @@ Each ``material`` element can have the following attributes or sub-elements:
|
|||
*Default*: None
|
||||
|
||||
An optional attribute/sub-element for each element is ``scattering``. This
|
||||
attribute may be set to "ace" to use the scattering laws specified in the
|
||||
ACE files (default). Alternatively, when set to "iso-in-lab", the ACE
|
||||
scattering laws are used to sample the outgoing energy but an
|
||||
attribute may be set to "data" to use the scattering laws specified by the
|
||||
cross section library (default). Alternatively, when set to "iso-in-lab",
|
||||
the scattering laws are used to sample the outgoing energy but an
|
||||
isotropic-in-lab distribution is used to sample the outgoing angle at each
|
||||
scattering interaction. The ``scattering`` attribute may be most useful
|
||||
when using OpenMC to compute multi-group cross-sections for deterministic
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ class Element(object):
|
|||
Chemical symbol of the element, e.g. Pu
|
||||
xs : str
|
||||
Cross section identifier, e.g. 71c
|
||||
scattering : 'ace' or 'iso-in-lab' or None
|
||||
scattering : 'data' or 'iso-in-lab' or None
|
||||
The type of angular scattering distribution to use
|
||||
|
||||
"""
|
||||
|
|
@ -94,9 +94,9 @@ class Element(object):
|
|||
@scattering.setter
|
||||
def scattering(self, scattering):
|
||||
|
||||
if not scattering in ['ace', 'iso-in-lab']:
|
||||
if not scattering in ['data', 'iso-in-lab']:
|
||||
msg = 'Unable to set scattering for Element to {0} ' \
|
||||
'which is not "ace" or "iso-in-lab"'.format(scattering)
|
||||
'which is not "data" or "iso-in-lab"'.format(scattering)
|
||||
raise ValueError(msg)
|
||||
|
||||
self._scattering = scattering
|
||||
|
|
|
|||
|
|
@ -33,8 +33,8 @@ NO_DENSITY = 99999.
|
|||
|
||||
|
||||
class Material(object):
|
||||
"""A material composed of a collection of nuclides/elements that can be assigned
|
||||
to a region of space.
|
||||
"""A material composed of a collection of nuclides/elements that can be
|
||||
assigned to a region of space.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ class Nuclide(object):
|
|||
zaid : int
|
||||
1000*(atomic number) + mass number. As an example, the zaid of U-235
|
||||
would be 92235.
|
||||
scattering : 'ace' or 'iso-in-lab' or None
|
||||
scattering : 'data' or 'iso-in-lab' or None
|
||||
The type of angular scattering distribution to use
|
||||
|
||||
"""
|
||||
|
|
@ -104,9 +104,9 @@ class Nuclide(object):
|
|||
@scattering.setter
|
||||
def scattering(self, scattering):
|
||||
|
||||
if not scattering in ['ace', 'iso-in-lab']:
|
||||
if not scattering in ['data', 'iso-in-lab']:
|
||||
msg = 'Unable to set scattering for Nuclide to {0} ' \
|
||||
'which is not "ace" or "iso-in-lab"'.format(scattering)
|
||||
'which is not "data" or "iso-in-lab"'.format(scattering)
|
||||
raise ValueError(msg)
|
||||
|
||||
self._scattering = scattering
|
||||
|
|
|
|||
|
|
@ -1940,9 +1940,9 @@ contains
|
|||
! Check enforced isotropic lab scattering
|
||||
if (check_for_node(node_nuc, "scattering")) then
|
||||
call get_node_value(node_nuc, "scattering", temp_str)
|
||||
if (trim(adjustl(to_lower(temp_str))) == "iso-in-lab") then
|
||||
if (adjustl(to_lower(temp_str)) == "iso-in-lab") then
|
||||
call list_iso_lab % append(1)
|
||||
else if (trim(adjustl(to_lower(temp_str))) == "ace") then
|
||||
else if (adjustl(to_lower(temp_str)) == "data") then
|
||||
call list_iso_lab % append(0)
|
||||
else
|
||||
call fatal_error("Scattering must be isotropic in lab or follow&
|
||||
|
|
@ -2043,14 +2043,14 @@ contains
|
|||
if (check_for_node(node_ele, "scattering")) then
|
||||
call get_node_value(node_ele, "scattering", temp_str)
|
||||
else
|
||||
temp_str = "ace"
|
||||
temp_str = "data"
|
||||
end if
|
||||
|
||||
! Set ace or iso-in-lab scattering for each nuclide in element
|
||||
do k = 1, n_nuc_ele
|
||||
if (trim(adjustl(to_lower(temp_str))) == "iso-in-lab") then
|
||||
if (adjustl(to_lower(temp_str)) == "iso-in-lab") then
|
||||
call list_iso_lab % append(1)
|
||||
else if (trim(adjustl(to_lower(temp_str))) == "ace") then
|
||||
else if (adjustl(to_lower(temp_str)) == "data") then
|
||||
call list_iso_lab % append(0)
|
||||
else
|
||||
call fatal_error("Scattering must be isotropic in lab or follow&
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue