mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 22:26:08 -04:00
Changes per comments of @smharper and @paulromano
This commit is contained in:
parent
08fdb8a91d
commit
473d3220dc
19 changed files with 221 additions and 207 deletions
|
|
@ -546,7 +546,8 @@ attributes/sub-elements:
|
|||
|
||||
*Default*: 0.988 2.249
|
||||
|
||||
.. note:: The above format should be used even when using the multi-group :ref:`energy_mode`.
|
||||
.. note:: The above format should be used even when using the multi-group
|
||||
:ref:`energy_mode`.
|
||||
|
||||
:write_initial:
|
||||
An element specifying whether to write out the initial source bank used at
|
||||
|
|
@ -1517,6 +1518,8 @@ The ``<tally>`` element accepts the following sub-elements:
|
|||
|
||||
.. note:: This score type is not used in the multi-group :ref:`energy_mode`.
|
||||
|
||||
.. _kappa_fission:
|
||||
|
||||
:kappa-fission:
|
||||
The recoverable energy production rate due to fission. The recoverable
|
||||
energy is defined as the fission product kinetic energy, prompt and
|
||||
|
|
|
|||
|
|
@ -385,7 +385,7 @@ ACE data as described below. The TALYS-based evaluated nuclear data library,
|
|||
TENDL_, is also openly available in ACE format.
|
||||
|
||||
In multi-group mode, OpenMC utilizes an XML-based library format which can be
|
||||
used to describe nuclidic- or material-specific quantities.
|
||||
used to describe nuclide- or material-specific quantities.
|
||||
|
||||
Using ENDF/B-VII.1 Cross Sections from NNDC
|
||||
-------------------------------------------
|
||||
|
|
|
|||
|
|
@ -87,18 +87,19 @@ attributes/sub-elements required to describe the meta-data:
|
|||
*Default*: None, this must be provided.
|
||||
|
||||
:alias:
|
||||
The number of total fission source iterations per batch.
|
||||
An alternative name to use for the microscopic or macroscopic data set.
|
||||
|
||||
*Default*: If no alias is provided, it will adopt the value of ``name``.
|
||||
|
||||
:kT:
|
||||
The temperature the data was generated at.
|
||||
The temperature times Boltzmann's constant (in units of MeV) at which the
|
||||
data was generated.
|
||||
|
||||
*Default*: Room temperature, 2.53E-8 MeV
|
||||
|
||||
:fissionable:
|
||||
This element states whether or not the data in question is fissionable.
|
||||
Accepted values are ``true`` or ``false``.
|
||||
Accepted values are "true" or "false".
|
||||
|
||||
*Default*: None, this element must be provided.
|
||||
|
||||
|
|
@ -108,42 +109,42 @@ attributes/sub-elements required to describe the meta-data:
|
|||
scalar flux weighting (or reduced to an equivalent representation)
|
||||
and thus are angle-independent, or if the data was generated with angular
|
||||
dependent fluxes and thus the data is angle-dependent. The options are
|
||||
either ``isotropic`` or ``angle``.
|
||||
either "isotropic" or "angle".
|
||||
|
||||
*Default*: ``isotropic``
|
||||
*Default*: "isotropic"
|
||||
|
||||
:num_azimuthal:
|
||||
This element provides the number of equi-width bins that the azimuthal
|
||||
angular domain is subdivided in the case of angle-dependent cross sections
|
||||
(i.e., ``angle`` is passed to the ``representation`` element).
|
||||
(i.e., "angle" is passed to the ``representation`` element).
|
||||
|
||||
*Default*: If ``representation`` is ``angle``, this must be provided. If
|
||||
*Default*: If ``representation`` is "angle", this must be provided. If
|
||||
not, this parameter is not used.
|
||||
|
||||
:num_polar:
|
||||
This element provides the number of equi-width bins that the polar angular
|
||||
domain is subdivided in the case of angle-dependent cross sections
|
||||
(i.e., ``angle`` is passed to the ``representation`` element).
|
||||
(i.e., "angle" is passed to the ``representation`` element).
|
||||
|
||||
*Default*: If ``representation`` is ``angle``, this must be provided. If
|
||||
*Default*: If ``representation`` is "angle", this must be provided. If
|
||||
not, this parameter is not used.
|
||||
|
||||
:scatt_type:
|
||||
This element provides the representation of the angular distribution
|
||||
associated with each group-to-group transfer probability. The options are
|
||||
either ``legendre``, ``histogram``, or ``tabular``.
|
||||
The ``legendre`` option means the angular distribution has been
|
||||
expanded via Legendre polynomials of the order provided in the ``order``
|
||||
either "legendre", "histogram", or "tabular".
|
||||
The "legendre" option means the angular distribution has been
|
||||
expanded via Legendre polynomials of the order provided in the "order"
|
||||
element.
|
||||
The ``histogram`` option means the angular distribution is provided in
|
||||
The "histogram" option means the angular distribution is provided in
|
||||
an equi-width histogram format with a number of bins as provided in the
|
||||
``order`` element. This is useful when the angular distribution was
|
||||
"order" element. This is useful when the angular distribution was
|
||||
obtained from a Monte Carlo tally and thus is natively in the histogram
|
||||
format.
|
||||
The ``tabular`` option means the angular distribution is provided in an
|
||||
The "tabular" option means the angular distribution is provided in an
|
||||
equi-spaced point-wise representation.
|
||||
|
||||
*Default*: ``legendre``
|
||||
*Default*: "legendre"
|
||||
|
||||
:order:
|
||||
This element provides either the Legendre order, number of bins, or number
|
||||
|
|
@ -165,17 +166,17 @@ attributes/sub-elements required to describe the meta-data:
|
|||
|
||||
:enable:
|
||||
This attribute/sub-element denotes whether or not the conversion to the
|
||||
tabular format should be performed or not. A value of ``true`` means
|
||||
the conversion should be performed, ``false`` means it should not.
|
||||
tabular format should be performed or not. A value of "true" means
|
||||
the conversion should be performed, "false" means it should not.
|
||||
|
||||
*Default*: ``true``
|
||||
*Default*: "true"
|
||||
|
||||
:num_points:
|
||||
If the conversion is to take place the number of tabular points is
|
||||
required. This attribute/sub-element allows the user to set the desired
|
||||
number of points.
|
||||
|
||||
*Default*: ``33``
|
||||
*Default*: 33
|
||||
|
||||
The following attributes/sub-elements are the cross section values to
|
||||
be used during the transport process.
|
||||
|
|
@ -183,9 +184,9 @@ attributes/sub-elements required to describe the meta-data:
|
|||
:total:
|
||||
This element requires the group-wise total cross section ordered by
|
||||
increasing group index (i.e., fast to thermal). If ``representation`` is
|
||||
``isotropic``, then the length of this list should equal the number of
|
||||
"isotropic", then the length of this list should equal the number of
|
||||
groups described in the ``groups`` element. If ``representation`` is
|
||||
``angle``, then the length of this list should equal the number of groups
|
||||
"angle", then the length of this list should equal the number of groups
|
||||
times the number of azimuthal angles times the number of polar angles,
|
||||
with the inner-dimension being groups, intermediate-dimension being
|
||||
azimuthal angles and outer-dimension being the polar angles.
|
||||
|
|
@ -196,9 +197,9 @@ attributes/sub-elements required to describe the meta-data:
|
|||
:absorption:
|
||||
This element requires the group-wise absorption cross section ordered by
|
||||
increasing group index (i.e., fast to thermal). If ``representation`` is
|
||||
``isotropic``, then the length of this list should equal the number of
|
||||
"isotropic", then the length of this list should equal the number of
|
||||
groups described in the ``groups`` element. If ``representation`` is
|
||||
``angle``, then the length of this list should equal the number of groups
|
||||
"angle", then the length of this list should equal the number of groups
|
||||
times the number of azimuthal angles times the number of polar angles,
|
||||
with the inner-dimension being groups, intermediate-dimension being
|
||||
azimuthal angles and outer-dimension being the polar angles.
|
||||
|
|
@ -210,9 +211,9 @@ attributes/sub-elements required to describe the meta-data:
|
|||
columns representing incoming group and rows representing the outgoing
|
||||
group. That is, down-scatter will be above the diagonal of the resultant
|
||||
matrix. This matrix is repeated for every Legendre order (in order of
|
||||
increasing orders) if ``scatt_type`` is ``legendre``; otherwise, this
|
||||
increasing orders) if ``scatt_type`` is "legendre"; otherwise, this
|
||||
matrix is repeated for every bin of the histogram or tabular
|
||||
representation. Finally, if ``representation`` is ``angle``, the above
|
||||
representation. Finally, if ``representation`` is "angle", the above
|
||||
is repeated for every azimuthal angle and every polar angle, in that
|
||||
order.
|
||||
|
||||
|
|
@ -232,32 +233,32 @@ attributes/sub-elements required to describe the meta-data:
|
|||
neglected).
|
||||
|
||||
The following fission-specific data are only needed should ``fissionable``
|
||||
be ``true``.
|
||||
be "true".
|
||||
|
||||
:fission:
|
||||
This element requires the group-wise fission cross section ordered by
|
||||
increasing group index (i.e., fast to thermal). If ``representation`` is
|
||||
``isotropic``, then the length of this list should equal the number of
|
||||
"isotropic", then the length of this list should equal the number of
|
||||
groups described in the ``groups`` element. If ``representation`` is
|
||||
``angle``, then the length of this list should equal the number of groups
|
||||
"angle", then the length of this list should equal the number of groups
|
||||
times the number of azimuthal angles times the number of polar angles,
|
||||
with the inner-dimension being groups, intermediate-dimension being
|
||||
azimuthal angles and outer-dimension being the polar angles.
|
||||
|
||||
*Default*: None, this is required only if ``fission`` tallies are
|
||||
*Default*: None, this is required only if fission tallies are
|
||||
requested and the material is fissionable.
|
||||
|
||||
:k_fission:
|
||||
:kappa_fission:
|
||||
This element requires the group-wise kappa-fission cross section ordered by
|
||||
increasing group index (i.e., fast to thermal). If ``representation`` is
|
||||
``isotropic``, then the length of this list should equal the number of
|
||||
"isotropic", then the length of this list should equal the number of
|
||||
groups described in the ``groups`` element. If ``representation`` is
|
||||
``angle``, then the length of this list should equal the number of groups
|
||||
"angle", then the length of this list should equal the number of groups
|
||||
times the number of azimuthal angles times the number of polar angles,
|
||||
with the inner-dimension being groups, intermediate-dimension being
|
||||
azimuthal angles and outer-dimension being the polar angles.
|
||||
|
||||
*Default*: None, this is required only if ``kappa-fission`` tallies are
|
||||
*Default*: None, this is required only if :ref:`kappa_fission` tallies are
|
||||
requested and the material is fissionable.
|
||||
|
||||
:chi:
|
||||
|
|
@ -267,9 +268,9 @@ attributes/sub-elements required to describe the meta-data:
|
|||
not depend on incoming energy. If the user does not wish to make this
|
||||
approximation, then this should not be provided and this information
|
||||
included in the ``nu_fission`` element instead. If ``representation`` is
|
||||
``isotropic``, then the length of this list should equal the number of
|
||||
"isotropic", then the length of this list should equal the number of
|
||||
groups described in the ``groups`` element. If ``representation`` is
|
||||
``angle``, then the length of this list should equal the number of groups
|
||||
"angle", then the length of this list should equal the number of groups
|
||||
times the number of azimuthal angles times the number of polar angles,
|
||||
with the inner-dimension being groups, intermediate-dimension being
|
||||
azimuthal angles and outer-dimension being the polar angles.
|
||||
|
|
|
|||
|
|
@ -15,5 +15,6 @@ is that documented here.
|
|||
**/source_bank** (Compound type)
|
||||
|
||||
Source bank information for each particle. The compound type has fields
|
||||
``wgt``, ``xyz``, ``uvw``, and ``E`` which represent the weight, position,
|
||||
direction, and energy of the source particle, respectively.
|
||||
``wgt``, ``xyz``, ``uvw``, ``E``, ``g``, and ``delayed_group``, which
|
||||
represent the weight, position, direction, energy, energy group, and
|
||||
delayed_group of the source particle, respectively.
|
||||
|
|
|
|||
|
|
@ -39,6 +39,12 @@ The current revision of the statepoint file format is 14.
|
|||
|
||||
Pseudo-random number generator seed.
|
||||
|
||||
**/run_CE** (*int*)
|
||||
|
||||
Flag to denote continuous-energy or multi-group mode. A value of 1
|
||||
indicates a continuous-energy run while a value of 0 indicates a
|
||||
multi-group run.
|
||||
|
||||
**/run_mode** (*char[]*)
|
||||
|
||||
Run mode used. A value of 1 indicates a fixed-source run and a value of 2
|
||||
|
|
@ -251,5 +257,6 @@ if (run_mode == 'k-eigenvalue' and source_present > 0)
|
|||
**/source_bank** (Compound type)
|
||||
|
||||
Source bank information for each particle. The compound type has fields
|
||||
``wgt``, ``xyz``, ``uvw``, and ``E`` which represent the weight,
|
||||
position, direction, and energy of the source particle, respectively.
|
||||
``wgt``, ``xyz``, ``uvw``, ``E``, ``g``, and ``delayed_group``, which
|
||||
represent the weight, position, direction, energy, energy group, and
|
||||
delayed_group of the source particle, respectively.
|
||||
|
|
|
|||
|
|
@ -20,7 +20,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.300k', 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])
|
||||
|
|
@ -43,7 +43,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.300k', 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])
|
||||
|
|
@ -57,7 +57,7 @@ scatter = [[[0.0444777, 0.1134000, 0.0007235, 0.0000037, 0.0000001, 0.0000000, 0
|
|||
[0.0000000, 0.0000000, 0.0000000, 0.0000714, 0.1391380, 0.5118200, 0.0612290],
|
||||
[0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0022157, 0.6999130, 0.5373200],
|
||||
[0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.1324400, 2.4807000]]]
|
||||
h2o_xsdata.scatter = np.array(scatter[:][:])
|
||||
h2o_xsdata.scatter = np.array(scatter)
|
||||
|
||||
mg_cross_sections_file = openmc.MGXSLibraryFile(groups)
|
||||
mg_cross_sections_file.add_xsdatas([uo2_xsdata,h2o_xsdata])
|
||||
|
|
@ -69,8 +69,8 @@ mg_cross_sections_file.export_to_xml()
|
|||
###############################################################################
|
||||
|
||||
# Instantiate some Macroscopic Data
|
||||
uo2_data = openmc.Macroscopic('UO2', '300k')
|
||||
h2o_data = openmc.Macroscopic('LWTR', '300k')
|
||||
uo2_data = openmc.Macroscopic('UO2', '300K')
|
||||
h2o_data = openmc.Macroscopic('LWTR', '300K')
|
||||
|
||||
# Instantiate some Materials and register the appropriate Nuclides
|
||||
uo2 = openmc.Material(material_id=1, name='UO2 fuel')
|
||||
|
|
@ -83,7 +83,7 @@ water.add_macroscopic(h2o_data)
|
|||
|
||||
# Instantiate a MaterialsFile, register all Materials, and export to XML
|
||||
materials_file = openmc.MaterialsFile()
|
||||
materials_file.default_xs = '300k'
|
||||
materials_file.default_xs = '300K'
|
||||
materials_file.add_materials([uo2, water])
|
||||
materials_file.export_to_xml()
|
||||
|
||||
|
|
@ -145,11 +145,6 @@ settings_file.inactive = inactive
|
|||
settings_file.particles = particles
|
||||
settings_file.set_source_space('box', [-0.63, -0.63, -1, \
|
||||
0.63, 0.63, 1])
|
||||
settings_file.entropy_lower_left = [-0.54, -0.54, -1.e50]
|
||||
settings_file.entropy_upper_right = [0.54, 0.54, 1.e50]
|
||||
settings_file.entropy_dimension = [10, 10, 1]
|
||||
settings_file.export_to_xml()
|
||||
|
||||
|
||||
###############################################################################
|
||||
# Exporting to OpenMC tallies.xml File
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0"?>
|
||||
<materials>
|
||||
<!-- Set default xs set to 71c, which is ENDF-B/VII.0 at 600K -->
|
||||
<default_xs>71c</default_xs>
|
||||
<!-- Set default xs set to 300 Kelvin -->
|
||||
<default_xs>300K</default_xs>
|
||||
|
||||
<!-- UO2 -->
|
||||
<material id="1">
|
||||
|
|
|
|||
|
|
@ -27,12 +27,6 @@
|
|||
</space>
|
||||
</source>
|
||||
|
||||
<!-- Establish statepoints to aid in examining convergence -->
|
||||
<state_point>
|
||||
<interval>2000</interval>
|
||||
<source_write>true</source_write>
|
||||
</state_point>
|
||||
|
||||
<output>
|
||||
<cross_sections>true</cross_sections>
|
||||
<summary>true</summary>
|
||||
|
|
|
|||
|
|
@ -50,8 +50,8 @@ class Material(object):
|
|||
Density of the material (units defined separately)
|
||||
density_units : str
|
||||
Units used for `density`. Can be one of 'g/cm3', 'g/cc', 'kg/cm3',
|
||||
'atom/b-cm', 'atom/cm3', 'sum', or 'macro' (the latter only applies
|
||||
if in multi-group mode).
|
||||
'atom/b-cm', 'atom/cm3', 'sum', or 'macro'. The 'macro' unit only
|
||||
applies in the case of a multi-group calculation.
|
||||
|
||||
"""
|
||||
|
||||
|
|
@ -346,7 +346,7 @@ class Material(object):
|
|||
'has already been added'.format(self._id, macroscopic)
|
||||
raise ValueError(msg)
|
||||
|
||||
if not isinstance(macroscopic, (openmc.Macroscopic, str)):
|
||||
if not isinstance(macroscopic, (openmc.Macroscopic, basestring)):
|
||||
msg = 'Unable to add a Macroscopic to Material ID="{0}" with a ' \
|
||||
'non-Macroscopic value "{1}"'.format(self._id, macroscopic)
|
||||
raise ValueError(msg)
|
||||
|
|
@ -511,7 +511,7 @@ class Material(object):
|
|||
|
||||
return xml_element
|
||||
|
||||
def _get_macroscopic_xml(self, macroscopic, distrib=False):
|
||||
def _get_macroscopic_xml(self, macroscopic):
|
||||
xml_element = ET.Element("macroscopic")
|
||||
xml_element.set("name", macroscopic._name)
|
||||
|
||||
|
|
@ -626,8 +626,7 @@ class Material(object):
|
|||
subelement.append(subsubelement)
|
||||
else:
|
||||
# Create macroscopic XML subelements
|
||||
subsubelement = self._get_macroscopic_xml(self,
|
||||
self._macroscopic,
|
||||
subsubelement = self._get_macroscopic_xml(self._macroscopic,
|
||||
distrib=True)
|
||||
subelement.append(subsubelement)
|
||||
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ class EnergyGroups(object):
|
|||
def __eq__(self, other):
|
||||
if not isinstance(other, EnergyGroups):
|
||||
return False
|
||||
elif self.group_edges != other.group_edges:
|
||||
elif (self.group_edges != other.group_edges).all():
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ from openmc.checkvalue import check_type, check_value, check_greater_than, \
|
|||
from openmc.clean_xml import *
|
||||
|
||||
# Supported incoming particle MGXS angular treatment representations
|
||||
REPRESENTATIONS = ['isotropic', 'angle']
|
||||
_REPRESENTATIONS = ['isotropic', 'angle']
|
||||
|
||||
def ndarray_to_string(arr):
|
||||
"""Converts a numpy ndarray in to a join with spaces between entries
|
||||
|
|
@ -87,7 +87,7 @@ class XSdata(object):
|
|||
name : str, optional
|
||||
Name of the mgxs data set.
|
||||
|
||||
representation : {'isotropic' or 'angle'}
|
||||
representation : {'isotropic', 'angle'}
|
||||
Method used in generating the MGXS (isotropic or angle-dependent flux
|
||||
weighting). Defaults to 'isotropic'
|
||||
|
||||
|
|
@ -241,7 +241,7 @@ class XSdata(object):
|
|||
@representation.setter
|
||||
def representation(self, representation):
|
||||
# Check it is of valid type.
|
||||
check_value('representation', representation, REPRESENTATIONS)
|
||||
check_value('representation', representation, _REPRESENTATIONS)
|
||||
self._representation = representation
|
||||
|
||||
@alias.setter
|
||||
|
|
|
|||
|
|
@ -72,12 +72,10 @@ class SettingsFile(object):
|
|||
environment variable will be used for continuous-energy calculations
|
||||
and :envvar:`MG_CROSS_SECTIONS` will be used for multi-group
|
||||
calculations to find the path to the XML cross section file.
|
||||
energy_grid : str
|
||||
Set the method used to search energy grids. Acceptable values are
|
||||
'nuclide', 'logarithm', and 'material-union'.
|
||||
energy_mode : str
|
||||
energy_grid : {'nuclide', 'logarithm', 'material-union'}
|
||||
Set the method used to search energy grids.
|
||||
energy_mode : {'continuous-energy', 'multi-group'}
|
||||
Set whether the calculation should be continuous-energy or multi-group.
|
||||
Acceptable values are 'continuous-energy' or 'multi-group'
|
||||
max_order : int
|
||||
Maximum scattering order to apply globally when in multi-group mode.
|
||||
ptables : bool
|
||||
|
|
@ -495,7 +493,7 @@ class SettingsFile(object):
|
|||
@max_order.setter
|
||||
def max_order(self, max_order):
|
||||
check_type('maximum scattering order', max_order, Integral)
|
||||
check_greater_than('maximum scattering order', max_order, 0)
|
||||
check_greater_than('maximum scattering order', max_order, 0, True)
|
||||
self._max_order = max_order
|
||||
|
||||
@source_file.setter
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ class Summary(object):
|
|||
self.date_and_time = self._f['date_and_time'][...]
|
||||
|
||||
# Read if continuous-energy or multi-group
|
||||
self.run_CE = bool(self._f['run_CE'].value)
|
||||
self.run_CE = (self._f['run_CE'].value == 1)
|
||||
|
||||
self.n_batches = self._f['n_batches'].value
|
||||
self.n_particles = self._f['n_particles'].value
|
||||
|
|
@ -278,7 +278,7 @@ class Summary(object):
|
|||
# Get the distribcell index
|
||||
ind = self._f['geometry/cells'][key]['distribcell_index'].value
|
||||
if ind != 0:
|
||||
cell.distribcell_index = ind
|
||||
cell.distribcell_index = ind
|
||||
|
||||
# Add the Cell to the global dictionary of all Cells
|
||||
self.cells[index] = cell
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ contains
|
|||
do i = 1, ng
|
||||
found = .false.
|
||||
do g = 1, energy_groups + 1
|
||||
if (cmfd%egrid(i) == energy_bins(g)) then
|
||||
if (cmfd % egrid(i) == energy_bins(g)) then
|
||||
found = .true.
|
||||
exit
|
||||
end if
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ module initialize
|
|||
hdf5_tallyresult_t, hdf5_integer8_t
|
||||
use input_xml, only: read_input_xml, cells_in_univ_dict, read_plots_xml
|
||||
use material_header, only: Material
|
||||
use mgxs_data
|
||||
use mgxs_data, only: read_mgxs, same_nuclide_mg_list, create_macro_xs
|
||||
use output, only: title, header, print_version, write_message, &
|
||||
print_usage, write_xs_summary, print_plot
|
||||
use random_lcg, only: initialize_prng
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ contains
|
|||
temp_str = trim(to_lower(temp_str))
|
||||
if (temp_str == "mg" .or. temp_str == "multi-group") then
|
||||
run_CE = .false.
|
||||
else if (temp_str == "ce" .or. temp_str == "continuous") then
|
||||
else if (temp_str == "ce" .or. temp_str == "continuous-energy") then
|
||||
run_CE = .true.
|
||||
end if
|
||||
end if
|
||||
|
|
@ -406,7 +406,7 @@ contains
|
|||
inquire(FILE=path_source, EXIST=file_exists)
|
||||
if (.not. file_exists) then
|
||||
call fatal_error("Binary source file '" // trim(path_source) &
|
||||
&// "' does not exist!")
|
||||
// "' does not exist!")
|
||||
end if
|
||||
|
||||
else
|
||||
|
|
@ -433,7 +433,7 @@ contains
|
|||
coeffs_reqd = 3
|
||||
case default
|
||||
call fatal_error("Invalid spatial distribution for external source: "&
|
||||
&// trim(type))
|
||||
// trim(type))
|
||||
end select
|
||||
|
||||
! Determine number of parameters specified
|
||||
|
|
@ -481,7 +481,7 @@ contains
|
|||
external_source % type_angle = SRC_ANGLE_TABULAR
|
||||
case default
|
||||
call fatal_error("Invalid angular distribution for external source: "&
|
||||
&// trim(type))
|
||||
// trim(type))
|
||||
end select
|
||||
|
||||
! Determine number of parameters specified
|
||||
|
|
@ -532,7 +532,7 @@ contains
|
|||
external_source % type_energy = SRC_ENERGY_TABULAR
|
||||
case default
|
||||
call fatal_error("Invalid energy distribution for external source: " &
|
||||
&// trim(type))
|
||||
// trim(type))
|
||||
end select
|
||||
|
||||
! Determine number of parameters specified
|
||||
|
|
@ -926,7 +926,7 @@ contains
|
|||
! check to make sure a nuclide is specified
|
||||
if (.not. check_for_node(node_scatterer, "nuclide")) then
|
||||
call fatal_error("No nuclide specified for scatterer " &
|
||||
&// trim(to_str(i)) // " in settings.xml file!")
|
||||
// trim(to_str(i)) // " in settings.xml file!")
|
||||
end if
|
||||
call get_node_value(node_scatterer, "nuclide", &
|
||||
nuclides_0K(i) % nuclide)
|
||||
|
|
@ -940,7 +940,7 @@ contains
|
|||
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")
|
||||
// " given in cross_sections.xml")
|
||||
end if
|
||||
call get_node_value(node_scatterer, "xs_label", &
|
||||
nuclides_0K(i) % name)
|
||||
|
|
@ -948,7 +948,7 @@ contains
|
|||
! 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")
|
||||
// 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)
|
||||
|
|
@ -1008,7 +1008,7 @@ contains
|
|||
default_expand = JENDL_40
|
||||
case default
|
||||
call fatal_error("Unknown natural element expansion option: " &
|
||||
&// trim(temp_str))
|
||||
// trim(temp_str))
|
||||
end select
|
||||
end if
|
||||
|
||||
|
|
@ -1125,7 +1125,7 @@ contains
|
|||
! Check to make sure 'id' hasn't been used
|
||||
if (cell_dict % has_key(c % id)) then
|
||||
call fatal_error("Two or more cells use the same unique ID: " &
|
||||
&// to_str(c % id))
|
||||
// to_str(c % id))
|
||||
end if
|
||||
|
||||
! Read material
|
||||
|
|
@ -1146,14 +1146,14 @@ contains
|
|||
! Check for error
|
||||
if (c % material == ERROR_INT) then
|
||||
call fatal_error("Invalid material specified on cell " &
|
||||
&// to_str(c % id))
|
||||
// to_str(c % id))
|
||||
end if
|
||||
end select
|
||||
|
||||
! Check to make sure that either material or fill was specified
|
||||
if (c % material == NONE .and. c % fill == NONE) then
|
||||
call fatal_error("Neither material nor fill was specified for cell " &
|
||||
&// trim(to_str(c % id)))
|
||||
// trim(to_str(c % id)))
|
||||
end if
|
||||
|
||||
! Check to make sure that both material and fill haven't been
|
||||
|
|
@ -1213,7 +1213,7 @@ contains
|
|||
n = get_arraysize_double(node_cell, "rotation")
|
||||
if (n /= 3) then
|
||||
call fatal_error("Incorrect number of rotation parameters on cell " &
|
||||
&// to_str(c % id))
|
||||
// to_str(c % id))
|
||||
end if
|
||||
|
||||
! Copy rotation angles in x,y,z directions
|
||||
|
|
@ -1241,7 +1241,7 @@ contains
|
|||
! another universe
|
||||
if (c % fill == NONE) then
|
||||
call fatal_error("Cannot apply a translation to cell " &
|
||||
&// trim(to_str(c % id)) // " because it is not filled with &
|
||||
// trim(to_str(c % id)) // " because it is not filled with &
|
||||
&another universe")
|
||||
end if
|
||||
|
||||
|
|
@ -1357,7 +1357,7 @@ contains
|
|||
! Check to make sure 'id' hasn't been used
|
||||
if (surface_dict % has_key(s%id)) then
|
||||
call fatal_error("Two or more surfaces use the same unique ID: " &
|
||||
&// to_str(s%id))
|
||||
// to_str(s%id))
|
||||
end if
|
||||
|
||||
! Copy surface name
|
||||
|
|
@ -1372,10 +1372,10 @@ contains
|
|||
n = get_arraysize_double(node_surf, "coeffs")
|
||||
if (n < coeffs_reqd) then
|
||||
call fatal_error("Not enough coefficients specified for surface: " &
|
||||
&// trim(to_str(s%id)))
|
||||
// trim(to_str(s%id)))
|
||||
elseif (n > coeffs_reqd) then
|
||||
call fatal_error("Too many coefficients specified for surface: " &
|
||||
&// trim(to_str(s%id)))
|
||||
// trim(to_str(s%id)))
|
||||
end if
|
||||
|
||||
allocate(coeffs(n))
|
||||
|
|
@ -1501,7 +1501,7 @@ contains
|
|||
! Check to make sure 'id' hasn't been used
|
||||
if (lattice_dict % has_key(lat % id)) then
|
||||
call fatal_error("Two or more lattices use the same unique ID: " &
|
||||
&// to_str(lat % id))
|
||||
// to_str(lat % id))
|
||||
end if
|
||||
|
||||
! Copy lattice name
|
||||
|
|
@ -1629,7 +1629,7 @@ contains
|
|||
! Check to make sure 'id' hasn't been used
|
||||
if (lattice_dict % has_key(lat % id)) then
|
||||
call fatal_error("Two or more lattices use the same unique ID: " &
|
||||
&// to_str(lat % id))
|
||||
// to_str(lat % id))
|
||||
end if
|
||||
|
||||
! Copy lattice name
|
||||
|
|
@ -1883,7 +1883,7 @@ contains
|
|||
! Check to make sure 'id' hasn't been used
|
||||
if (material_dict % has_key(mat % id)) then
|
||||
call fatal_error("Two or more materials use the same unique ID: " &
|
||||
&// to_str(mat % id))
|
||||
// to_str(mat % id))
|
||||
end if
|
||||
|
||||
! Copy material name
|
||||
|
|
@ -1906,7 +1906,7 @@ contains
|
|||
call get_node_ptr(node_mat, "density", node_dens)
|
||||
else
|
||||
call fatal_error("Must specify density element in material " &
|
||||
&// trim(to_str(mat % id)))
|
||||
// trim(to_str(mat % id)))
|
||||
end if
|
||||
|
||||
! Initialize value to zero
|
||||
|
|
@ -1943,7 +1943,7 @@ contains
|
|||
sum_density = .false.
|
||||
if (val <= ZERO) then
|
||||
call fatal_error("Need to specify a positive density on material " &
|
||||
&// trim(to_str(mat % id)) // ".")
|
||||
// trim(to_str(mat % id)) // ".")
|
||||
end if
|
||||
|
||||
! Adjust material density based on specified units
|
||||
|
|
@ -1958,7 +1958,7 @@ contains
|
|||
mat % density = 1.0e-24_8 * val
|
||||
case default
|
||||
call fatal_error("Unkwown units '" // trim(units) &
|
||||
&// "' specified on material " // trim(to_str(mat % id)))
|
||||
// "' specified on material " // trim(to_str(mat % id)))
|
||||
end select
|
||||
end if
|
||||
|
||||
|
|
@ -1981,7 +1981,7 @@ contains
|
|||
call get_node_list(node_mat, "macroscopic", node_macro_list)
|
||||
if (get_list_size(node_macro_list) > 1) then
|
||||
call fatal_error("Only one macroscopic object permitted per material, " &
|
||||
&// trim(to_str(mat % id)))
|
||||
// trim(to_str(mat % id)))
|
||||
else if (get_list_size(node_macro_list) == 1) then
|
||||
|
||||
call get_list_item(node_macro_list, 1, node_nuc)
|
||||
|
|
@ -1989,7 +1989,7 @@ contains
|
|||
! Check for empty name on nuclide
|
||||
if (.not.check_for_node(node_nuc, "name")) then
|
||||
call fatal_error("No name specified on macroscopic data in material " &
|
||||
&// trim(to_str(mat % id)))
|
||||
// trim(to_str(mat % id)))
|
||||
end if
|
||||
|
||||
! Check for cross section
|
||||
|
|
@ -2033,7 +2033,7 @@ contains
|
|||
call list_density % append(ONE)
|
||||
else
|
||||
call fatal_error("Units can only be macro for macroscopic data " &
|
||||
&// trim(name))
|
||||
// trim(name))
|
||||
end if
|
||||
else
|
||||
|
||||
|
|
@ -2048,7 +2048,7 @@ contains
|
|||
! Check for empty name on nuclide
|
||||
if (.not.check_for_node(node_nuc, "name")) then
|
||||
call fatal_error("No name specified on nuclide in material " &
|
||||
&// trim(to_str(mat % id)))
|
||||
// trim(to_str(mat % id)))
|
||||
end if
|
||||
|
||||
! Check for cross section
|
||||
|
|
@ -2079,7 +2079,7 @@ contains
|
|||
if (.not.check_for_node(node_nuc, "ao") .and. &
|
||||
.not.check_for_node(node_nuc, "wo")) then
|
||||
call fatal_error("No atom or weight percent specified for nuclide " &
|
||||
&// trim(name))
|
||||
// trim(name))
|
||||
elseif (check_for_node(node_nuc, "ao") .and. &
|
||||
check_for_node(node_nuc, "wo")) then
|
||||
call fatal_error("Cannot specify both atom and weight percents for a &
|
||||
|
|
@ -2110,7 +2110,7 @@ contains
|
|||
! Check for empty name on natural element
|
||||
if (.not.check_for_node(node_ele, "name")) then
|
||||
call fatal_error("No name specified on nuclide in material " &
|
||||
&// trim(to_str(mat % id)))
|
||||
// trim(to_str(mat % id)))
|
||||
end if
|
||||
call get_node_value(node_ele, "name", name)
|
||||
|
||||
|
|
@ -2131,7 +2131,7 @@ contains
|
|||
if (.not.check_for_node(node_ele, "ao") .and. &
|
||||
.not.check_for_node(node_ele, "wo")) then
|
||||
call fatal_error("No atom or weight percent specified for element " &
|
||||
&// trim(name))
|
||||
// trim(name))
|
||||
elseif (check_for_node(node_ele, "ao") .and. &
|
||||
check_for_node(node_ele, "wo")) then
|
||||
call fatal_error("Cannot specify both atom and weight percents for &
|
||||
|
|
@ -2191,7 +2191,7 @@ contains
|
|||
name = trim(list_names % get_item(j))
|
||||
if (.not. xs_listing_dict % has_key(to_lower(name))) then
|
||||
call fatal_error("Could not find nuclide " // trim(name) &
|
||||
&// " in cross_sections data file!")
|
||||
// " in cross_sections data file!")
|
||||
end if
|
||||
|
||||
if (run_CE) then
|
||||
|
|
@ -2199,7 +2199,7 @@ contains
|
|||
n = len_trim(name)
|
||||
if (name(n:n) /= 'c') then
|
||||
call fatal_error("Cross-section table " // trim(name) &
|
||||
&// " is not a continuous-energy neutron table.")
|
||||
// " is not a continuous-energy neutron table.")
|
||||
end if
|
||||
end if
|
||||
|
||||
|
|
@ -2238,7 +2238,7 @@ contains
|
|||
if (.not. (all(mat % atom_density >= ZERO) .or. &
|
||||
all(mat % atom_density <= ZERO))) then
|
||||
call fatal_error("Cannot mix atom and weight percents in material " &
|
||||
&// to_str(mat % id))
|
||||
// to_str(mat % id))
|
||||
end if
|
||||
|
||||
! Determine density if it is a sum value
|
||||
|
|
@ -2286,7 +2286,7 @@ contains
|
|||
! Check that this nuclide is listed in the cross_sections.xml file
|
||||
if (.not. xs_listing_dict % has_key(to_lower(name))) then
|
||||
call fatal_error("Could not find S(a,b) table " // trim(name) &
|
||||
&// " in cross_sections.xml file!")
|
||||
// " in cross_sections.xml file!")
|
||||
end if
|
||||
|
||||
! Find index in xs_listing and set the name and alias according to the
|
||||
|
|
@ -2448,7 +2448,7 @@ contains
|
|||
! Check to make sure 'id' hasn't been used
|
||||
if (mesh_dict % has_key(m % id)) then
|
||||
call fatal_error("Two or more meshes use the same unique ID: " &
|
||||
&// to_str(m % id))
|
||||
// to_str(m % id))
|
||||
end if
|
||||
|
||||
! Read mesh type
|
||||
|
|
@ -2589,7 +2589,7 @@ contains
|
|||
! Check to make sure 'id' hasn't been used
|
||||
if (tally_dict % has_key(t % id)) then
|
||||
call fatal_error("Two or more tallies use the same unique ID: " &
|
||||
&// to_str(t % id))
|
||||
// to_str(t % id))
|
||||
end if
|
||||
|
||||
! Copy tally name
|
||||
|
|
@ -2630,7 +2630,7 @@ contains
|
|||
end if
|
||||
else
|
||||
call fatal_error("Bins not set in filter on tally " &
|
||||
&// trim(to_str(t % id)))
|
||||
// trim(to_str(t % id)))
|
||||
end if
|
||||
|
||||
! Determine type of filter
|
||||
|
|
@ -2722,7 +2722,7 @@ contains
|
|||
m => meshes(i_mesh)
|
||||
else
|
||||
call fatal_error("Could not find mesh " // trim(to_str(id)) &
|
||||
&// " specified on tally " // trim(to_str(t % id)))
|
||||
// " specified on tally " // trim(to_str(t % id)))
|
||||
end if
|
||||
|
||||
! Determine number of bins -- this is assuming that the tally is
|
||||
|
|
@ -2906,8 +2906,8 @@ contains
|
|||
case default
|
||||
! Specified tally filter is invalid, raise error
|
||||
call fatal_error("Unknown filter type '" &
|
||||
&// trim(temp_str) // "' on tally " &
|
||||
&// trim(to_str(t % id)) // ".")
|
||||
// trim(temp_str) // "' on tally " &
|
||||
// trim(to_str(t % id)) // ".")
|
||||
|
||||
end select
|
||||
|
||||
|
|
@ -3003,8 +3003,8 @@ contains
|
|||
! Check if no nuclide was found
|
||||
if (.not. associated(pair_list)) then
|
||||
call fatal_error("Could not find the nuclide " &
|
||||
&// trim(word) // " specified in tally " &
|
||||
&// trim(to_str(t % id)) // " in any material.")
|
||||
// trim(word) // " specified in tally " &
|
||||
// trim(to_str(t % id)) // " in any material.")
|
||||
end if
|
||||
deallocate(pair_list)
|
||||
|
||||
|
|
@ -3072,12 +3072,12 @@ contains
|
|||
! maximum order.
|
||||
! The above scheme will essentially take the absolute value
|
||||
if (master) call warning("Invalid scattering order of " &
|
||||
&// trim(to_str(n_order)) // " requested. Setting to the &
|
||||
// trim(to_str(n_order)) // " requested. Setting to the &
|
||||
&maximum permissible value, " &
|
||||
&// trim(to_str(MAX_ANG_ORDER)))
|
||||
// trim(to_str(MAX_ANG_ORDER)))
|
||||
n_order = MAX_ANG_ORDER
|
||||
sarray(j) = trim(MOMENT_STRS(imomstr)) &
|
||||
&// trim(to_str(MAX_ANG_ORDER))
|
||||
// trim(to_str(MAX_ANG_ORDER))
|
||||
end if
|
||||
! Find total number of bins for this case
|
||||
if (imomstr >= YN_LOC) then
|
||||
|
|
@ -3139,9 +3139,9 @@ contains
|
|||
! maximum order.
|
||||
! The above scheme will essentially take the absolute value
|
||||
if (master) call warning("Invalid scattering order of " &
|
||||
&// trim(to_str(n_order)) // " requested. Setting to &
|
||||
// trim(to_str(n_order)) // " requested. Setting to &
|
||||
&the maximum permissible value, " &
|
||||
&// trim(to_str(MAX_ANG_ORDER)))
|
||||
// trim(to_str(MAX_ANG_ORDER)))
|
||||
n_order = MAX_ANG_ORDER
|
||||
end if
|
||||
score_name = trim(MOMENT_N_STRS(imomstr)) // "n"
|
||||
|
|
@ -3293,9 +3293,21 @@ contains
|
|||
case ('n2n', '(n,2n)')
|
||||
t % score_bins(j) = N_2N
|
||||
|
||||
! Disallow for MG mode since data not present
|
||||
if (.not. run_CE) then
|
||||
call fatal_error("Cannot tally (n,2n) reaction rate in &
|
||||
&multi-group mode")
|
||||
end if
|
||||
|
||||
case ('n3n', '(n,3n)')
|
||||
t % score_bins(j) = N_3N
|
||||
|
||||
! Disallow for MG mode since data not present
|
||||
if (.not. run_CE) then
|
||||
call fatal_error("Cannot tally (n,3n) reaction rate in &
|
||||
&multi-group mode")
|
||||
end if
|
||||
|
||||
case ('n4n', '(n,4n)')
|
||||
t % score_bins(j) = N_4N
|
||||
|
||||
|
|
@ -3480,13 +3492,13 @@ contains
|
|||
t % score_bins(j) = MT
|
||||
else
|
||||
call fatal_error("Invalid MT on <scores>: " &
|
||||
&// trim(sarray(l)))
|
||||
// trim(sarray(l)))
|
||||
end if
|
||||
|
||||
else
|
||||
! Specified score was not an integer
|
||||
call fatal_error("Unknown scoring function: " &
|
||||
&// trim(sarray(l)))
|
||||
// trim(sarray(l)))
|
||||
end if
|
||||
|
||||
end select
|
||||
|
|
@ -3507,7 +3519,7 @@ contains
|
|||
deallocate(sarray)
|
||||
else
|
||||
call fatal_error("No <scores> specified on tally " &
|
||||
&// trim(to_str(t % id)) // ".")
|
||||
// trim(to_str(t % id)) // ".")
|
||||
end if
|
||||
|
||||
! If settings.xml trigger is turned on, create tally triggers
|
||||
|
|
@ -3768,7 +3780,7 @@ contains
|
|||
inquire(FILE=filename, EXIST=file_exists)
|
||||
if (.not. file_exists) then
|
||||
call fatal_error("Plots XML file '" // trim(filename) &
|
||||
&// "' does not exist!")
|
||||
// "' does not exist!")
|
||||
end if
|
||||
|
||||
! Display output message
|
||||
|
|
@ -3800,7 +3812,7 @@ contains
|
|||
! Check to make sure 'id' hasn't been used
|
||||
if (plot_dict % has_key(pl % id)) then
|
||||
call fatal_error("Two or more plots use the same unique ID: " &
|
||||
&// to_str(pl % id))
|
||||
// to_str(pl % id))
|
||||
end if
|
||||
|
||||
! Copy plot type
|
||||
|
|
@ -3815,7 +3827,7 @@ contains
|
|||
pl % type = PLOT_TYPE_VOXEL
|
||||
case default
|
||||
call fatal_error("Unsupported plot type '" // trim(temp_str) &
|
||||
&// "' in plot " // trim(to_str(pl % id)))
|
||||
// "' in plot " // trim(to_str(pl % id)))
|
||||
end select
|
||||
|
||||
! Set output file path
|
||||
|
|
@ -3835,14 +3847,14 @@ contains
|
|||
call get_node_array(node_plot, "pixels", pl % pixels(1:2))
|
||||
else
|
||||
call fatal_error("<pixels> must be length 2 in slice plot " &
|
||||
&// trim(to_str(pl % id)))
|
||||
// trim(to_str(pl % id)))
|
||||
end if
|
||||
else if (pl % type == PLOT_TYPE_VOXEL) then
|
||||
if (get_arraysize_integer(node_plot, "pixels") == 3) then
|
||||
call get_node_array(node_plot, "pixels", pl % pixels(1:3))
|
||||
else
|
||||
call fatal_error("<pixels> must be length 3 in voxel plot " &
|
||||
&// trim(to_str(pl % id)))
|
||||
// trim(to_str(pl % id)))
|
||||
end if
|
||||
end if
|
||||
|
||||
|
|
@ -3850,13 +3862,13 @@ contains
|
|||
if (check_for_node(node_plot, "background")) then
|
||||
if (pl % type == PLOT_TYPE_VOXEL) then
|
||||
if (master) call warning("Background color ignored in voxel plot " &
|
||||
&// trim(to_str(pl % id)))
|
||||
// trim(to_str(pl % id)))
|
||||
end if
|
||||
if (get_arraysize_integer(node_plot, "background") == 3) then
|
||||
call get_node_array(node_plot, "background", pl % not_found % rgb)
|
||||
else
|
||||
call fatal_error("Bad background RGB in plot " &
|
||||
&// trim(to_str(pl % id)))
|
||||
// trim(to_str(pl % id)))
|
||||
end if
|
||||
else
|
||||
pl % not_found % rgb = (/ 255, 255, 255 /)
|
||||
|
|
@ -3877,7 +3889,7 @@ contains
|
|||
pl % basis = PLOT_BASIS_YZ
|
||||
case default
|
||||
call fatal_error("Unsupported plot basis '" // trim(temp_str) &
|
||||
&// "' in plot " // trim(to_str(pl % id)))
|
||||
// "' in plot " // trim(to_str(pl % id)))
|
||||
end select
|
||||
end if
|
||||
|
||||
|
|
@ -3886,7 +3898,7 @@ contains
|
|||
call get_node_array(node_plot, "origin", pl % origin)
|
||||
else
|
||||
call fatal_error("Origin must be length 3 in plot " &
|
||||
&// trim(to_str(pl % id)))
|
||||
// trim(to_str(pl % id)))
|
||||
end if
|
||||
|
||||
! Copy plotting width
|
||||
|
|
@ -3895,14 +3907,14 @@ contains
|
|||
call get_node_array(node_plot, "width", pl % width(1:2))
|
||||
else
|
||||
call fatal_error("<width> must be length 2 in slice plot " &
|
||||
&// trim(to_str(pl % id)))
|
||||
// trim(to_str(pl % id)))
|
||||
end if
|
||||
else if (pl % type == PLOT_TYPE_VOXEL) then
|
||||
if (get_arraysize_double(node_plot, "width") == 3) then
|
||||
call get_node_array(node_plot, "width", pl % width(1:3))
|
||||
else
|
||||
call fatal_error("<width> must be length 3 in voxel plot " &
|
||||
&// trim(to_str(pl % id)))
|
||||
// trim(to_str(pl % id)))
|
||||
end if
|
||||
end if
|
||||
|
||||
|
|
@ -3912,7 +3924,7 @@ contains
|
|||
|
||||
if (pl % level < 0) then
|
||||
call fatal_error("Bad universe level in plot " &
|
||||
&// trim(to_str(pl % id)))
|
||||
// trim(to_str(pl % id)))
|
||||
end if
|
||||
else
|
||||
pl % level = PLOT_LEVEL_LOWEST
|
||||
|
|
@ -3946,7 +3958,7 @@ contains
|
|||
|
||||
case default
|
||||
call fatal_error("Unsupported plot color type '" // trim(temp_str) &
|
||||
&// "' in plot " // trim(to_str(pl % id)))
|
||||
// "' in plot " // trim(to_str(pl % id)))
|
||||
end select
|
||||
|
||||
! Get the number of <col_spec> nodes and get a list of them
|
||||
|
|
@ -3969,7 +3981,7 @@ contains
|
|||
! Check and make sure 3 values are specified for RGB
|
||||
if (get_arraysize_double(node_col, "rgb") /= 3) then
|
||||
call fatal_error("Bad RGB in plot " &
|
||||
&// trim(to_str(pl % id)))
|
||||
// trim(to_str(pl % id)))
|
||||
end if
|
||||
|
||||
! Ensure that there is an id for this color specification
|
||||
|
|
@ -3988,7 +4000,7 @@ contains
|
|||
call get_node_array(node_col, "rgb", pl % colors(col_id) % rgb)
|
||||
else
|
||||
call fatal_error("Could not find cell " // trim(to_str(col_id)) &
|
||||
&// " specified in plot " // trim(to_str(pl % id)))
|
||||
// " specified in plot " // trim(to_str(pl % id)))
|
||||
end if
|
||||
|
||||
else if (pl % color_by == PLOT_COLOR_MATS) then
|
||||
|
|
@ -3998,8 +4010,8 @@ contains
|
|||
call get_node_array(node_col, "rgb", pl % colors(col_id) % rgb)
|
||||
else
|
||||
call fatal_error("Could not find material " &
|
||||
&// trim(to_str(col_id)) // " specified in plot " &
|
||||
&// trim(to_str(pl % id)))
|
||||
// trim(to_str(col_id)) // " specified in plot " &
|
||||
// trim(to_str(pl % id)))
|
||||
end if
|
||||
|
||||
end if
|
||||
|
|
@ -4013,7 +4025,7 @@ contains
|
|||
|
||||
if (pl % type == PLOT_TYPE_VOXEL) then
|
||||
call warning("Meshlines ignored in voxel plot " &
|
||||
&// trim(to_str(pl % id)))
|
||||
// trim(to_str(pl % id)))
|
||||
end if
|
||||
|
||||
select case(n_meshlines)
|
||||
|
|
@ -4047,7 +4059,7 @@ contains
|
|||
! Check and make sure 3 values are specified for RGB
|
||||
if (get_arraysize_double(node_meshlines, "color") /= 3) then
|
||||
call fatal_error("Bad RGB for meshlines color in plot " &
|
||||
&// trim(to_str(pl % id)))
|
||||
// trim(to_str(pl % id)))
|
||||
end if
|
||||
|
||||
call get_node_array(node_meshlines, "color", &
|
||||
|
|
@ -4064,7 +4076,7 @@ contains
|
|||
|
||||
if (.not. associated(ufs_mesh)) then
|
||||
call fatal_error("No UFS mesh for meshlines on plot " &
|
||||
&// trim(to_str(pl % id)))
|
||||
// trim(to_str(pl % id)))
|
||||
end if
|
||||
|
||||
pl % meshlines_mesh => ufs_mesh
|
||||
|
|
@ -4085,7 +4097,7 @@ contains
|
|||
|
||||
if (.not. associated(entropy_mesh)) then
|
||||
call fatal_error("No entropy mesh for meshlines on plot " &
|
||||
&// trim(to_str(pl % id)))
|
||||
// trim(to_str(pl % id)))
|
||||
end if
|
||||
|
||||
if (.not. allocated(entropy_mesh % dimension)) then
|
||||
|
|
@ -4114,18 +4126,18 @@ contains
|
|||
end if
|
||||
else
|
||||
call fatal_error("Could not find mesh " &
|
||||
&// trim(to_str(meshid)) // " specified in meshlines for &
|
||||
// trim(to_str(meshid)) // " specified in meshlines for &
|
||||
&plot " // trim(to_str(pl % id)))
|
||||
end if
|
||||
|
||||
case default
|
||||
call fatal_error("Invalid type for meshlines on plot " &
|
||||
&// trim(to_str(pl % id)) // ": " // trim(meshtype))
|
||||
// trim(to_str(pl % id)) // ": " // trim(meshtype))
|
||||
end select
|
||||
|
||||
case default
|
||||
call fatal_error("Mutliple meshlines specified in plot " &
|
||||
&// trim(to_str(pl % id)))
|
||||
// trim(to_str(pl % id)))
|
||||
end select
|
||||
|
||||
end if
|
||||
|
|
@ -4137,13 +4149,13 @@ contains
|
|||
|
||||
if (pl % type == PLOT_TYPE_VOXEL) then
|
||||
if (master) call warning("Mask ignored in voxel plot " &
|
||||
&// trim(to_str(pl % id)))
|
||||
// trim(to_str(pl % id)))
|
||||
end if
|
||||
|
||||
select case(n_masks)
|
||||
case default
|
||||
call fatal_error("Mutliple masks specified in plot " &
|
||||
&// trim(to_str(pl % id)))
|
||||
// trim(to_str(pl % id)))
|
||||
case (1)
|
||||
|
||||
! Get pointer to mask
|
||||
|
|
@ -4154,7 +4166,7 @@ contains
|
|||
n_comp = get_arraysize_integer(node_mask, "components")
|
||||
if (n_comp == 0) then
|
||||
call fatal_error("Missing <components> in mask of plot " &
|
||||
&// trim(to_str(pl % id)))
|
||||
// trim(to_str(pl % id)))
|
||||
end if
|
||||
allocate(iarray(n_comp))
|
||||
call get_node_array(node_mask, "components", iarray)
|
||||
|
|
@ -4170,7 +4182,7 @@ contains
|
|||
iarray(j) = cell_dict % get_key(col_id)
|
||||
else
|
||||
call fatal_error("Could not find cell " &
|
||||
&// trim(to_str(col_id)) // " specified in the mask in &
|
||||
// trim(to_str(col_id)) // " specified in the mask in &
|
||||
&plot " // trim(to_str(pl % id)))
|
||||
end if
|
||||
|
||||
|
|
@ -4180,7 +4192,7 @@ contains
|
|||
iarray(j) = material_dict % get_key(col_id)
|
||||
else
|
||||
call fatal_error("Could not find material " &
|
||||
&// trim(to_str(col_id)) // " specified in the mask in &
|
||||
// trim(to_str(col_id)) // " specified in the mask in &
|
||||
&plot " // trim(to_str(pl % id)))
|
||||
end if
|
||||
|
||||
|
|
@ -4194,7 +4206,7 @@ contains
|
|||
call get_node_array(node_mask, "background", pl % colors(j) % rgb)
|
||||
else
|
||||
call fatal_error("Missing <background> in mask of plot " &
|
||||
&// trim(to_str(pl % id)))
|
||||
// trim(to_str(pl % id)))
|
||||
end if
|
||||
end if
|
||||
end do
|
||||
|
|
@ -4239,7 +4251,7 @@ contains
|
|||
if (.not. file_exists) then
|
||||
! Could not find cross_sections.xml file
|
||||
call fatal_error("Cross sections XML file '" &
|
||||
&// trim(path_cross_sections) // "' does not exist!")
|
||||
// trim(path_cross_sections) // "' does not exist!")
|
||||
end if
|
||||
|
||||
call write_message("Reading cross sections XML file...", 5)
|
||||
|
|
@ -4269,7 +4281,7 @@ contains
|
|||
filetype = ASCII
|
||||
else
|
||||
call fatal_error("Unknown filetype in cross_sections.xml: " &
|
||||
&// trim(temp_str))
|
||||
// trim(temp_str))
|
||||
end if
|
||||
|
||||
! copy default record length and entries for binary files
|
||||
|
|
@ -4367,8 +4379,8 @@ contains
|
|||
do i = 1, n_res_scatterers_total
|
||||
if (.not. xs_listing_dict % has_key(trim(nuclides_0K(i) % name_0K))) then
|
||||
call fatal_error("Could not find nuclide " &
|
||||
&// trim(nuclides_0K(i) % name_0K) &
|
||||
&// " in cross_sections.xml file!")
|
||||
// trim(nuclides_0K(i) % name_0K) &
|
||||
// " in cross_sections.xml file!")
|
||||
end if
|
||||
end do
|
||||
|
||||
|
|
@ -4385,14 +4397,13 @@ contains
|
|||
type(Node), pointer :: doc => null()
|
||||
type(Node), pointer :: node_xsdata => null()
|
||||
type(NodeList), pointer :: node_xsdata_list => null()
|
||||
! character(MAX_LINE_LEN) :: temp_str
|
||||
|
||||
! Check if cross_sections.xml exists
|
||||
inquire(FILE=path_cross_sections, EXIST=file_exists)
|
||||
if (.not. file_exists) then
|
||||
! Could not find cross_sections.xml file
|
||||
call fatal_error("Cross sections XML file '" &
|
||||
&// trim(path_cross_sections) // "' does not exist!")
|
||||
// trim(path_cross_sections) // "' does not exist!")
|
||||
end if
|
||||
|
||||
call write_message("Reading cross sections XML file...", 5)
|
||||
|
|
@ -4417,7 +4428,7 @@ contains
|
|||
|
||||
allocate(energy_bin_avg(energy_groups))
|
||||
do i = 1, energy_groups
|
||||
energy_bin_avg(i) = 0.5_8 * (energy_bins(i) + energy_bins(i + 1))
|
||||
energy_bin_avg(i) = HALF * (energy_bins(i) + energy_bins(i + 1))
|
||||
end do
|
||||
|
||||
allocate(inverse_velocities(energy_groups))
|
||||
|
|
@ -4440,8 +4451,8 @@ contains
|
|||
|
||||
! Allocate xs_listings array
|
||||
if (n_listings == 0) then
|
||||
call fatal_error("No XSDATA listings present in cross_sections.xml &
|
||||
&file!")
|
||||
call fatal_error("At least one <xsdata> element must be present in &
|
||||
&cross_sections.xml file!")
|
||||
else
|
||||
allocate(xs_listings(n_listings))
|
||||
end if
|
||||
|
|
@ -4474,7 +4485,7 @@ contains
|
|||
if (check_for_node(node_xsdata, "kT")) then
|
||||
call get_node_value(node_xsdata, "kT", listing % kT)
|
||||
else
|
||||
listing % kT = 2.53E-8_8
|
||||
listing % kT = 293.6_8 * K_BOLTZMANN
|
||||
end if
|
||||
|
||||
! determine type of cross section
|
||||
|
|
|
|||
|
|
@ -370,12 +370,12 @@ contains
|
|||
end if
|
||||
if (get_kfiss) then
|
||||
allocate(this % k_fission(groups))
|
||||
if (check_for_node(node_xsdata, "k_fission")) then
|
||||
call get_node_array(node_xsdata, "k_fission", this % k_fission)
|
||||
if (check_for_node(node_xsdata, "kappa_fission")) then
|
||||
call get_node_array(node_xsdata, "kappa_fission", this % k_fission)
|
||||
else
|
||||
error_code = 1
|
||||
error_text = "k_fission data missing, required due to kappa-fission&
|
||||
& tallies in tallies.xml file!"
|
||||
error_text = "kappa_fission data missing, required due to &
|
||||
&kappa-fission tallies in tallies.xml file!"
|
||||
return
|
||||
end if
|
||||
end if
|
||||
|
|
@ -554,22 +554,22 @@ contains
|
|||
deallocate(temp_arr)
|
||||
else
|
||||
error_code = 1
|
||||
error_text = "Fission data missing, required due to kappa-fission&
|
||||
error_text = "Fission data missing, required due to fission&
|
||||
& tallies in tallies.xml file!"
|
||||
return
|
||||
end if
|
||||
end if
|
||||
if (get_kfiss) then
|
||||
if (check_for_node(node_xsdata, "k_fission")) then
|
||||
if (check_for_node(node_xsdata, "kappa_fission")) then
|
||||
allocate(temp_arr(groups * this % Nazi * this % Npol))
|
||||
call get_node_array(node_xsdata, "k_fission", temp_arr)
|
||||
call get_node_array(node_xsdata, "kappa_fission", temp_arr)
|
||||
allocate(this % k_fission(groups, this % Nazi, this % Npol))
|
||||
this % k_fission = reshape(temp_arr, (/groups, this % Nazi, this % Npol/))
|
||||
deallocate(temp_arr)
|
||||
else
|
||||
error_code = 1
|
||||
error_text = "k_fission data missing, required due to kappa-fission&
|
||||
& tallies in tallies.xml file!"
|
||||
error_text = "kappa_fission data missing, required due to &
|
||||
&kappa-fission tallies in tallies.xml file!"
|
||||
return
|
||||
end if
|
||||
end if
|
||||
|
|
|
|||
|
|
@ -727,14 +727,12 @@ contains
|
|||
! It is not impossible for a state point to be generated from a CE run but
|
||||
! to be loaded in to an MG run (or vice versa), check to prevent that.
|
||||
call read_dataset(file_id, "run_CE", sp_run_CE)
|
||||
if (sp_run_CE == 0) then
|
||||
if (run_CE) &
|
||||
call fatal_error("State point file is from multi-group run but &
|
||||
& current run is continous-energy!")
|
||||
else if (sp_run_CE == 1) then
|
||||
if (.not. run_CE) &
|
||||
call fatal_error("State point file is from continuous-energy run but &
|
||||
& current run is multi-group!")
|
||||
if (sp_run_CE == 0 .and. run_CE) then
|
||||
call fatal_error("State point file is from multi-group run but &
|
||||
& current run is continous-energy!")
|
||||
else if (sp_run_CE == 1 .and. .not. run_CE) then
|
||||
call fatal_error("State point file is from continuous-energy run but &
|
||||
& current run is multi-group!")
|
||||
end if
|
||||
|
||||
! Read and overwrite run information except number of batches
|
||||
|
|
|
|||
|
|
@ -778,7 +778,6 @@ contains
|
|||
end if
|
||||
end if
|
||||
|
||||
|
||||
end select
|
||||
|
||||
!#########################################################################
|
||||
|
|
@ -807,6 +806,14 @@ contains
|
|||
real(8) :: macro_total ! material macro total xs
|
||||
real(8) :: macro_scatt ! material macro scatt xs
|
||||
real(8) :: micro_abs ! nuclidic microscopic abs
|
||||
real(8) :: p_uvw(3) ! Particle's current uvw
|
||||
|
||||
! Set the direction, if needed for nuclidic data, so that nuc % get_xs
|
||||
! knows wihch direction it should be using for direction-dependent
|
||||
! mgxs
|
||||
if (i_nuclide > 0) then
|
||||
p_uvw = p % coord(p % n_coord) % uvw
|
||||
end if
|
||||
|
||||
i = 0
|
||||
SCORE_LOOP: do q = 1, t % n_user_score_bins
|
||||
|
|
@ -860,7 +867,7 @@ contains
|
|||
else
|
||||
if (i_nuclide > 0) then
|
||||
associate (nuc => nuclides_MG(i_nuclide) % obj)
|
||||
score = nuc % get_xs(p % g, 'total', UVW=p % coord(i) % uvw) * &
|
||||
score = nuc % get_xs(p % g, 'total', UVW=p_uvw) * &
|
||||
atom_density * flux
|
||||
end associate
|
||||
else
|
||||
|
|
@ -902,7 +909,7 @@ contains
|
|||
! Note SCORE_SCATTER_N not available for tracklength/collision.
|
||||
if (i_nuclide > 0) then
|
||||
associate (nuc => nuclides_MG(i_nuclide) % obj)
|
||||
score = nuc % get_xs(p % g, 'scatter', UVW=p % coord(i) % uvw) * &
|
||||
score = nuc % get_xs(p % g, 'scatter', UVW=p_uvw) * &
|
||||
atom_density * flux
|
||||
end associate
|
||||
else
|
||||
|
|
@ -1069,7 +1076,7 @@ contains
|
|||
else
|
||||
if (i_nuclide > 0) then
|
||||
associate (nuc => nuclides_MG(i_nuclide) % obj)
|
||||
score = nuc % get_xs(p % g, 'absorption', UVW=p % coord(i) % uvw) &
|
||||
score = nuc % get_xs(p % g, 'absorption', UVW=p_uvw) &
|
||||
* atom_density * flux
|
||||
end associate
|
||||
else
|
||||
|
|
@ -1085,10 +1092,10 @@ contains
|
|||
! calculate fraction of absorptions that would have resulted in
|
||||
! fission
|
||||
associate (nuc => nuclides_MG(i_nuclide) % obj)
|
||||
micro_abs = nuc % get_xs(p % g, 'absorption', UVW=p % coord(i) % uvw)
|
||||
micro_abs = nuc % get_xs(p % g, 'absorption', UVW=p_uvw)
|
||||
if (micro_abs > ZERO) then
|
||||
score = p % absorb_wgt * &
|
||||
nuc % get_xs(p % g, 'fission', UVW=p % coord(i) % uvw) &
|
||||
nuc % get_xs(p % g, 'fission', UVW=p_uvw) &
|
||||
/ micro_abs
|
||||
else
|
||||
score = ZERO
|
||||
|
|
@ -1102,20 +1109,20 @@ contains
|
|||
! fission reaction rate
|
||||
associate (nuc => nuclides_MG(i_nuclide) % obj)
|
||||
score = p % last_wgt &
|
||||
* nuc % get_xs(p % g, 'fission', UVW=p % coord(i) % uvw) &
|
||||
/ nuc % get_xs(p % g, 'absorption', UVW=p % coord(i) % uvw)
|
||||
* nuc % get_xs(p % g, 'fission', UVW=p_uvw) &
|
||||
/ nuc % get_xs(p % g, 'absorption', UVW=p_uvw)
|
||||
end associate
|
||||
end if
|
||||
|
||||
else
|
||||
if (i_nuclide > 0) then
|
||||
associate (nuc => nuclides_MG(i_nuclide) % obj)
|
||||
score = nuc % get_xs(p % g, 'fission', UVW=p % coord(i) % uvw) * &
|
||||
score = nuc % get_xs(p % g, 'fission', UVW=p_uvw) * &
|
||||
atom_density * flux
|
||||
end associate
|
||||
else
|
||||
score = flux * macro_xs(p % material) % obj % get_xs(p % g, &
|
||||
'fission', UVW=p % coord(i) % uvw)
|
||||
'fission', UVW=p_uvw)
|
||||
|
||||
end if
|
||||
end if
|
||||
|
|
@ -1139,10 +1146,10 @@ contains
|
|||
! calculate fraction of absorptions that would have resulted in
|
||||
! nu-fission
|
||||
associate (nuc => nuclides_MG(i_nuclide) % obj)
|
||||
micro_abs = nuc % get_xs(p % g, 'absorption', UVW=p % coord(i) % uvw)
|
||||
micro_abs = nuc % get_xs(p % g, 'absorption', UVW=p_uvw)
|
||||
if (micro_abs > ZERO) then
|
||||
score = p % absorb_wgt * &
|
||||
nuc % get_xs(p % g, 'fission', UVW=p % coord(i) % uvw) / &
|
||||
nuc % get_xs(p % g, 'fission', UVW=p_uvw) / &
|
||||
micro_abs
|
||||
else
|
||||
score = ZERO
|
||||
|
|
@ -1162,7 +1169,7 @@ contains
|
|||
else
|
||||
if (i_nuclide > 0) then
|
||||
associate (nuc => nuclides_MG(i_nuclide) % obj)
|
||||
score = nuc % get_xs(p % g, 'nu_fission', UVW=p % coord(i) % uvw) &
|
||||
score = nuc % get_xs(p % g, 'nu_fission', UVW=p_uvw) &
|
||||
* atom_density * flux
|
||||
end associate
|
||||
else
|
||||
|
|
@ -1180,10 +1187,10 @@ contains
|
|||
! calculate fraction of absorptions that would have resulted in
|
||||
! fission scale by kappa-fission
|
||||
associate (nuc => nuclides_MG(i_nuclide) % obj)
|
||||
micro_abs = nuc % get_xs(p % g, 'absorption', UVW=p % coord(i) % uvw)
|
||||
micro_abs = nuc % get_xs(p % g, 'absorption', UVW=p_uvw)
|
||||
if (micro_abs > ZERO) then
|
||||
score = p % absorb_wgt * &
|
||||
nuc % get_xs(p % g, 'k_fission', UVW=p % coord(i) % uvw) / &
|
||||
nuc % get_xs(p % g, 'k_fission', UVW=p_uvw) / &
|
||||
micro_abs
|
||||
end if
|
||||
end associate
|
||||
|
|
@ -1195,20 +1202,20 @@ contains
|
|||
! the fission energy production rate
|
||||
associate (nuc => nuclides_MG(i_nuclide) % obj)
|
||||
score = p % last_wgt * &
|
||||
nuc % get_xs(p % g, 'k_fission', UVW=p % coord(i) % uvw) / &
|
||||
nuc % get_xs(p % g, 'absorption', UVW=p % coord(i) % uvw)
|
||||
nuc % get_xs(p % g, 'k_fission', UVW=p_uvw) / &
|
||||
nuc % get_xs(p % g, 'absorption', UVW=p_uvw)
|
||||
end associate
|
||||
end if
|
||||
|
||||
else
|
||||
if (i_nuclide > 0) then
|
||||
associate (nuc => nuclides_MG(i_nuclide) % obj)
|
||||
score = nuc % get_xs(p % g, 'k_fission', UVW=p % coord(i) % uvw) &
|
||||
score = nuc % get_xs(p % g, 'k_fission', UVW=p_uvw) &
|
||||
* atom_density * flux
|
||||
end associate
|
||||
else
|
||||
score = flux * macro_xs(p % material) % obj % get_xs(p % g, &
|
||||
'k_fission', UVW=p % coord(i) % uvw)
|
||||
'k_fission', UVW=p_uvw)
|
||||
end if
|
||||
end if
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue