Merge branch 'develop' into refactor_write_source_bank

This commit is contained in:
Gavin Ridley 2023-03-31 14:17:53 -04:00 committed by GitHub
commit 5aa1d256bb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
225 changed files with 16573 additions and 15747 deletions

View file

@ -35,13 +35,16 @@ jobs:
vectfit: [n]
include:
- python-version: 3.7
- python-version: "3.7"
omp: n
mpi: n
- python-version: 3.8
- python-version: "3.8"
omp: n
mpi: n
- python-version: 3.9
- python-version: "3.9"
omp: n
mpi: n
- python-version: "3.11"
omp: n
mpi: n
- dagmc: y

View file

@ -4,7 +4,7 @@ project(openmc C CXX)
# Set version numbers
set(OPENMC_VERSION_MAJOR 0)
set(OPENMC_VERSION_MINOR 13)
set(OPENMC_VERSION_RELEASE 3)
set(OPENMC_VERSION_RELEASE 4)
set(OPENMC_VERSION ${OPENMC_VERSION_MAJOR}.${OPENMC_VERSION_MINOR}.${OPENMC_VERSION_RELEASE})
configure_file(include/openmc/version.h.in "${CMAKE_BINARY_DIR}/include/openmc/version.h" @ONLY)

View file

@ -71,7 +71,7 @@ copyright = '2011-2023, Massachusetts Institute of Technology, UChicago Argonne
# The short X.Y version.
version = "0.13"
# The full version, including alpha/beta/rc tags.
release = "0.13.3"
release = "0.13.4"
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.

View file

@ -72,12 +72,23 @@ The current version of the statepoint file format is 17.0.
:Datasets: - **type** (*char[]*) -- Type of mesh.
- **dimension** (*int*) -- Number of mesh cells in each dimension.
- **lower_left** (*double[]*) -- Coordinates of lower-left corner of
mesh.
- **upper_right** (*double[]*) -- Coordinates of upper-right corner
of mesh.
- **width** (*double[]*) -- Width of each mesh cell in each
dimension.
- **Regular Mesh Only:**
- **lower_left** (*double[]*) -- Coordinates of lower-left corner of
mesh.
- **upper_right** (*double[]*) -- Coordinates of upper-right corner
of mesh.
- **width** (*double[]*) -- Width of each mesh cell in each
dimension.
- **Rectilinear Mesh Only:**
- **x_grid** (*double[]*) -- Mesh divisions along the x-axis.
- **y_grid** (*double[]*) -- Mesh divisions along the y-axis.
- **z_grid** (*double[]*) -- Mesh divisions along the z-axis.
- **Cylindrical & Spherical Mesh Only:**
- **r_grid** (*double[]*) -- The mesh divisions along the r-axis.
- **phi_grid** (*double[]*) -- The mesh divisions along the phi-axis.
- **origin** (*double[]*) -- The origin in cartesian coordinates.
- **Spherical Mesh Only:**
- **theta_grid** (*double[]*) -- The mesh divisions along the theta-axis.
- **Unstructured Mesh Only:**
- **filename** (*char[]*) -- Name of the mesh file.
- **library** (*char[]*) -- Mesh library used to represent the

View file

@ -351,6 +351,9 @@ attributes/sub-elements:
:theta_grid:
The mesh divisions along the theta-axis. (For spherical mesh only.)
:origin:
The origin in cartesian coordinates. (For cylindrical and spherical meshes only.)
:library:
The mesh library used to represent an unstructured mesh. This can be either
"moab" or "libmesh". (For unstructured mesh only.)

View file

@ -14,7 +14,7 @@ Notably, a capability has been added to compute the photon spectra from decay of
unstable nuclides. Alongside that, a new :data:`openmc.config` configuration
variable has been introduced that allows easier configuration of data sources.
Additionally, users can now perform cell or material rejection when sampling
external source distributions. Finally,
external source distributions.
------------------------------------
Compatibility Notes and Deprecations

View file

@ -0,0 +1,134 @@
====================
What's New in 0.13.3
====================
.. currentmodule:: openmc
-------
Summary
-------
This release of OpenMC includes many bug fixes, performance improvements, and
several notable new features. Some of the highlights include support for MCPL
source files, NCrystal thermal scattering materials, and a new
:class:`openmc.stats.MeshSpatial` class that allows a source distribution to be
specified over a mesh. Additionally, OpenMC now allows you to export your model
as a single XML file rather than separate XML files for geometry, materials,
settings, and tallies.
------------------------------------
Compatibility Notes and Deprecations
------------------------------------
- Atomic mass data used in :func:`openmc.data.atomic_mass` has been updated to
AME 2020, which results in slightly different masses.
------------
New Features
------------
- Support was added for `MCPL <https://mctools.github.io/mcpl/>`_ files to be
used as external sources. Additionally, source points and surfaces sources can
be written as MCPL files instead of HDF5 files. (`#2116
<https://github.com/openmc-dev/openmc/pull/2116>`_)
- Support was added for `NCrystal <https://github.com/mctools/ncrystal>`_
thermal scattering materials. (`#2222
<https://github.com/openmc-dev/openmc/pull/2222>`_)
- The :class:`~openmc.CylindricalMesh` and :class:`~openmc.SphericalMesh`
classes now have an ``origin`` attribute that changes the center of the mesh.
(`#2256 <https://github.com/openmc-dev/openmc/pull/2256>`_)
- A new :class:`openmc.model.Polygon` class allows defining generalized 2D
polygons. (`#2266 <https://github.com/openmc-dev/openmc/pull/2266>`_)
- A new :func:`openmc.data.decay_energy` function and
:meth:`openmc.Material.get_decay_heat` method enable determination of decay
heat from a single nuclide or material. (`#2287
<https://github.com/openmc-dev/openmc/pull/2287>`_)
- Full models can now be written as a single XML file rather than separate
geometry, materials, settings, and tallies XML files. (`#2291
<https://github.com/openmc-dev/openmc/pull/2291>`_)
- Discrete distributions are now sampled using alias sampling, which is O(1) in
time. (`#2329 <https://github.com/openmc-dev/openmc/pull/2329>`_)
- The new :class:`openmc.stats.MeshSpatial` allows a spatial source distribution
to be specified with source strengths for each mesh element. (`#2334
<https://github.com/openmc-dev/openmc/pull/2334>`_)
- The new :meth:`openmc.Geometry.get_surfaces_by_name` method returns a list of
matching surfaces in a geometry. (`#2347
<https://github.com/openmc-dev/openmc/pull/2347>`_)
- A new :attr:`openmc.Settings.create_delayed_neutrons` attribute controls
whether delayed neutrons are created during a simulation. (`#2348
<https://github.com/openmc-dev/openmc/pull/2348>`_)
- The :meth:`openmc.deplete.Results.export_to_materials` method now takes a
``path`` argument. (`#2364 <https://github.com/openmc-dev/openmc/pull/2364>`_)
- A new :meth:`openmc.EnergyFilter.get_tabular` method allows one to create a
tabular distribution based on tally results using an energy filter. (`#2371
<https://github.com/openmc-dev/openmc/pull/2371>`_)
- Several methods in the :class:`openmc.Material` class that require a volume to
be set (e.g., :meth:`~openmc.Material.get_mass`) now accept a ``volume``
argument. (`#2412 <https://github.com/openmc-dev/openmc/pull/2412>`_)
---------
Bug Fixes
---------
- Fix for finding redundant surfaces (`#2263 <https://github.com/openmc-dev/openmc/pull/2263>`_)
- Adds tolerance for temperatures slightly out of bounds (`#2265 <https://github.com/openmc-dev/openmc/pull/2265>`_)
- Fix getter/setter for weight window bounds (`#2275 <https://github.com/openmc-dev/openmc/pull/2275>`_)
- Make sure Chain.reduce preserves decay source (`#2283 <https://github.com/openmc-dev/openmc/pull/2283>`_)
- Fix array shape for weight window bounds (`#2284 <https://github.com/openmc-dev/openmc/pull/2284>`_)
- Fix for non-zero CDF start points in TSL data (`#2290 <https://github.com/openmc-dev/openmc/pull/2290>`_)
- Fix a case where inelastic scattering yield is zero (`#2295 <https://github.com/openmc-dev/openmc/pull/2295>`_)
- Prevent Compton profile out-of-bounds memory access (`#2297 <https://github.com/openmc-dev/openmc/pull/2297>`_)
- Produce light particles from decay (`#2301 <https://github.com/openmc-dev/openmc/pull/2301>`_)
- Fix zero runtime attributes in depletion statepoints (`#2302 <https://github.com/openmc-dev/openmc/pull/2302>`_)
- Fix bug in openmc.Universe.get_nuclide_densities (`#2310 <https://github.com/openmc-dev/openmc/pull/2310>`_)
- Only show print output from depletion on rank 0 (`#2311 <https://github.com/openmc-dev/openmc/pull/2311>`_)
- Fix photon transport with no atomic relaxation data (`#2312 <https://github.com/openmc-dev/openmc/pull/2312>`_)
- Fix for precedence in region expressions (`#2318 <https://github.com/openmc-dev/openmc/pull/2318>`_)
- Allow source particles with energy below cutoff (`#2319 <https://github.com/openmc-dev/openmc/pull/2319>`_)
- Fix IncidentNeutron.from_njoy for high temperatures (`#2320 <https://github.com/openmc-dev/openmc/pull/2320>`_)
- Add capability to unset cell temperatures (`#2323 <https://github.com/openmc-dev/openmc/pull/2323>`_)
- Fix in plot_xs when S(a,b) tables are present (`#2335 <https://github.com/openmc-dev/openmc/pull/2335>`_)
- Various fixes for tally triggers (`#2344 <https://github.com/openmc-dev/openmc/pull/2344>`_)
- Raise error when mesh is flat (`#2363 <https://github.com/openmc-dev/openmc/pull/2363>`_)
- Don't call normalize inside Tabular.mean (`#2375 <https://github.com/openmc-dev/openmc/pull/2375>`_)
- Avoid out-of-bounds access in inelastic scatter sampling (`#2378 <https://github.com/openmc-dev/openmc/pull/2378>`_)
- Use correct direction for anisotropic fission (`#2381 <https://github.com/openmc-dev/openmc/pull/2381>`_)
- Fix several thermal scattering nuclide assignments (`#2382 <https://github.com/openmc-dev/openmc/pull/2382>`_)
- Fix _materials_by_id attribute in Model (`#2385 <https://github.com/openmc-dev/openmc/pull/2385>`_)
- Updates to batch checks for simulation restarts (`#2390 <https://github.com/openmc-dev/openmc/pull/2390>`_)
- write_data_to_vtk volume normalization correction (`#2397 <https://github.com/openmc-dev/openmc/pull/2397>`_)
- Enable generation of JEFF 3.3 depletion chain (`#2410 <https://github.com/openmc-dev/openmc/pull/2410>`_)
- Fix spherical to Cartesian coordinate conversion (`#2417 <https://github.com/openmc-dev/openmc/pull/2417>`_)
- Handle zero photon cross sections in IncidentPhoton.from_ace (`#2433 <https://github.com/openmc-dev/openmc/pull/2433>`_)
- Fix hybrid depletion when nuclides are not present (`#2436 <https://github.com/openmc-dev/openmc/pull/2436>`_)
- Fix bug in cylindrical and spherical meshes (`#2439 <https://github.com/openmc-dev/openmc/pull/2439>`_)
- Improvements to mesh radial boundary coincidence (`#2443 <https://github.com/openmc-dev/openmc/pull/2443>`_)
------------
Contributors
------------
- `Hunter Belanger <https://github.com/HunterBelanger>`_
- `Rémi Delaporte-Mathurin <https://github.com/RemDelaporteMathurin>`_
- `Christopher Fichtlscherer <https://github.com/cfichtlscherer>`_
- `Valerio Giusti <https://github.com/valeriogiusti>`_
- `Chris Keckler <https://github.com/keckler>`_
- `Kalin Kiesling <https://github.com/kkiesling>`_
- `Thomas Kittelmann <https://github.com/tkittel>`_
- `Erik Knudsen <https://github.com/ebknudsen>`_
- `Colin Larmier <https://github.com/colinelarmier>`_
- `Amanda Lund <https://github.com/amandalund>`_
- `Jose Ignacio Marquez Damien <https://github.com/marquezj>`_
- `Josh May <https://github.com/joshmay1>`_
- `Patrick Myers <https://github.com/myerspat>`_
- `Baptiste Mouginot <https://github.com/bam241>`_
- `April Novak <https://github.com/aprilnovak>`_
- `Matthew Nyberg <https://github.com/NybergWISC>`_
- `Ethan Peterson <https://github.com/eepeterson>`_
- `Gavin Ridley <https://github.com/gridley>`_
- `Paul Romano <https://github.com/paulromano>`_
- `Patrick Shriwise <https://github.com/pshriwise>`_
- `Jonathan Shimwell <https://github.com/Shimwell>`_
- `Paul Wilson <https://github.com/gonuke>`_
- `Olek Yardas <https://github.com/yardasol>`_
- `Jiankai Yu <https://github.com/rockfool>`_

View file

@ -7,6 +7,7 @@ Release Notes
.. toctree::
:maxdepth: 1
0.13.3
0.13.2
0.13.1
0.13.0

View file

@ -105,9 +105,9 @@ other information use:
.. note::
It should be noted that by default OpenMC builds with ``-O2 -g`` flags which
are equivalent to a CMake build type of `RelwithDebInfo`. In addition, MPI
is OFF while OpenMP is ON.
It should be noted that by default OpenMC is built with
`-DCMAKE_BUILD_TYPE=RelwithDebInfo`. In addition, MPI is OFF while OpenMP is
ON.
It is recommended to install OpenMC with the Python API. Information about this
Spack recipe can be found with the following command:
@ -133,17 +133,18 @@ following command:
configured defaults unless otherwise specfied in the specification on the
command line. In the above example, assuming the default options weren't
changed in Spack's package configuration, py-openmc will link against a
non-optimized non-MPI openmc. Even if an optimized openmc was built
separately, it will rebuild openmc with optimization OFF. Thus, if you are
trying to link against dependencies that were configured different than
defaults, ``^openmc[variants]`` will have to be present in the command.
non-MPI non-release build of openmc. Even if a release build of openmc was
built separately, it will rebuild openmc with the default build type. Thus,
if you are trying to link against dependencies that were configured
different than defaults, ``^openmc[variants]`` will have to be present in
the command.
For a more performant build of OpenMC with optimization turned ON and MPI
provided by OpenMPI, the following command can be used:
For a release build of OpenMC with MPI support on (provided by OpenMPI), the
following command can be used:
.. code-block:: sh
spack install py-openmc+mpi ^openmc+optimize ^openmpi
spack install py-openmc +mpi ^openmpi ^openmc build_type=Release
.. note::
@ -163,7 +164,7 @@ This can be observed using Spack's ``spec`` tool:
.. code-block::
spack spec py-openmc+mpi ^openmc+optimize
spack spec py-openmc +mpi ^openmc build_type=Release
Once installed, environment/lmod modules can be generated or Spack's ``load``
feature can be used to access the installed packages.
@ -277,7 +278,7 @@ Prerequisites
Lists) files instead of .h5 files for sources (external source
distribution, k-eigenvalue source distribution, and surface sources). To
turn this option on in the CMake configuration step, add the following
option:
option::
cmake -DOPENMC_USE_MCPL=on ..
@ -288,7 +289,7 @@ Prerequisites
on-the-fly approach. To use it `install
<https://github.com/mctools/ncrystal/wiki/Get-NCrystal>`_ and `initialize
<https://github.com/mctools/ncrystal/wiki/Using-NCrystal#setting-up>`_
NCrystal and turn on the option in the CMake configuration step:
NCrystal and turn on the option in the CMake configuration step::
cmake -DOPENMC_USE_NCRYSTAL=on ..
@ -299,7 +300,7 @@ Prerequisites
be used, but the implementation is currently restricted to collision
estimators. In addition to turning this option on, the path to the libMesh
installation should be specified as part of the ``CMAKE_PREFIX_PATH``
variable.::
variable::
cmake -DOPENMC_USE_LIBMESH=on -DOPENMC_USE_MPI=on -DCMAKE_PREFIX_PATH=/path/to/libmesh/installation ..
@ -371,6 +372,10 @@ CMakeLists.txt Options
The following options are available in the CMakeLists.txt file:
OPENMC_ENABLE_COVERAGE
Compile and link code instrumented for coverage analysis. This is typically
used in conjunction with gcov_. (Default: off)
OPENMC_ENABLE_PROFILE
Enables profiling using the GNU profiler, gprof. (Default: off)
@ -385,22 +390,23 @@ OPENMC_USE_DAGMC
should also be defined as `DAGMC_ROOT` in the CMake configuration command.
(Default: off)
OPENMC_USE_MCPL
Turns on support for reading MCPL_ source files and writing MCPL source points
and surface sources. (Default: off)
OPENMC_USE_NCRYSTAL
Turns on support for NCrystal materials. NCrystal must be
`installed <https://github.com/mctools/ncrystal/wiki/Get-NCrystal>`_ and
`initialized <https://github.com/mctools/ncrystal/wiki/Using-NCrystal#setting-up>`_.
Turns on support for NCrystal materials. NCrystal must be `installed
<https://github.com/mctools/ncrystal/wiki/Get-NCrystal>`_ and `initialized
<https://github.com/mctools/ncrystal/wiki/Using-NCrystal#setting-up>`_.
(Default: off)
OPENMC_USE_LIBMESH
Enables the use of unstructured mesh tallies with libMesh_. (Default: off)
OPENMC_ENABLE_COVERAGE
Compile and link code instrumented for coverage analysis. This is typically
used in conjunction with gcov_. (Default: off)
OPENMC_USE_MPI
Turns on compiling with MPI (default: off). For further information on MPI options,
please see the `FindMPI.cmake documentation <https://cmake.org/cmake/help/latest/module/FindMPI.html>`_.
Turns on compiling with MPI (Default: off). For further information on MPI
options, please see the `FindMPI.cmake documentation
<https://cmake.org/cmake/help/latest/module/FindMPI.html>`_.
To set any of these options (e.g., turning on profiling), the following form
should be used:
@ -521,13 +527,7 @@ distribution/repository, run:
pip will first check that all :ref:`required third-party packages
<usersguide_python_prereqs>` have been installed, and if they are not present,
they will be installed by downloading the appropriate packages from the Python
Package Index (`PyPI <https://pypi.org/>`_). However, do note that since pip
runs the ``setup.py`` script which requires NumPy, you will have to first
install NumPy:
.. code-block:: sh
pip install numpy
Package Index (`PyPI <https://pypi.org/>`_).
Installing in "Development" Mode
--------------------------------

View file

@ -25,7 +25,7 @@ using double_4dvec = vector<vector<vector<vector<double>>>>;
constexpr int HDF5_VERSION[] {3, 0};
// Version numbers for binary files
constexpr array<int, 2> VERSION_STATEPOINT {18, 0};
constexpr array<int, 2> VERSION_STATEPOINT {18, 1};
constexpr array<int, 2> VERSION_PARTICLE_RESTART {2, 0};
constexpr array<int, 2> VERSION_TRACK {3, 0};
constexpr array<int, 2> VERSION_SUMMARY {6, 0};
@ -51,6 +51,10 @@ constexpr double FP_PRECISION {1e-14};
constexpr double FP_REL_PRECISION {1e-5};
constexpr double FP_COINCIDENT {1e-12};
// Coincidence tolerances
constexpr double TORUS_TOL {1e-10};
constexpr double RADIAL_MESH_TOL {1e-10};
// Maximum number of random samples per history
constexpr int MAX_SAMPLE {100000};

View file

@ -31,6 +31,39 @@ using UPtrDist = unique_ptr<Distribution>;
//! \return Unique pointer to distribution
UPtrDist distribution_from_xml(pugi::xml_node node);
//==============================================================================
//! A discrete distribution index (probability mass function)
//==============================================================================
class DiscreteIndex {
public:
DiscreteIndex() {};
DiscreteIndex(pugi::xml_node node);
DiscreteIndex(const double* p, int n);
void assign(const double* p, int n);
//! Sample a value from the distribution
//! \param seed Pseudorandom number seed pointer
//! \return Sampled value
size_t sample(uint64_t* seed) const;
// Properties
const vector<double>& prob() const { return prob_; }
const vector<size_t>& alias() const { return alias_; }
private:
vector<double> prob_; //!< Probability of accepting the uniformly sampled bin,
//!< mapped to alias method table
vector<size_t> alias_; //!< Alias table
//! Normalize distribution so that probabilities sum to unity
void normalize();
//! Initialize alias tables for distribution
void init_alias();
};
//==============================================================================
//! A discrete distribution (probability mass function)
//==============================================================================
@ -47,20 +80,13 @@ public:
// Properties
const vector<double>& x() const { return x_; }
const vector<double>& prob() const { return prob_; }
const vector<size_t>& alias() const { return alias_; }
const vector<double>& prob() const { return di_.prob(); }
const vector<size_t>& alias() const { return di_.alias(); }
private:
vector<double> x_; //!< Possible outcomes
vector<double> prob_; //!< Probability of accepting the uniformly sampled bin,
//!< mapped to alias method table
vector<size_t> alias_; //!< Alias table
//! Normalize distribution so that probabilities sum to unity
void normalize();
//! Initialize alias tables for distribution
void init_alias(vector<double>& x, vector<double>& p);
vector<double> x_; //!< Possible outcomes
DiscreteIndex di_; //!< discrete probability distribution of
//!< outcome indices
};
//==============================================================================

View file

@ -114,11 +114,8 @@ public:
private:
int32_t mesh_idx_ {C_NONE};
double total_strength_ {0.0};
// TODO: move to an independent class in the future that's similar
// to a discrete distribution without outcomes
std::vector<double> mesh_CDF_;
std::vector<double> mesh_strengths_;
DiscreteIndex elem_idx_dist_; //!< Distribution of
//!< mesh element indices
};
//==============================================================================

View file

@ -90,6 +90,12 @@ public:
void set_densities(
const vector<std::string>& name, const vector<double>& density);
//! Clone the material by deep-copying all members, except for the ID,
// which will get auto-assigned to the next available ID. After creating
// the new material, it is added to openmc::model::materials.
//! \return reference to the cloned material
Material & clone();
//----------------------------------------------------------------------------
// Accessors

View file

@ -75,6 +75,12 @@ public:
// Methods
//! Update a position to the local coordinates of the mesh
virtual void local_coords(Position& r) const {};
//! Return a position in the local coordinates of the mesh
virtual Position local_coords(const Position& r) const { return r; };
//! Sample a mesh volume using a certain seed
//
//! \param[in] seed Seed to use for random sampling
@ -262,6 +268,23 @@ public:
protected:
};
class PeriodicStructuredMesh : public StructuredMesh {
public:
PeriodicStructuredMesh() = default;
PeriodicStructuredMesh(pugi::xml_node node) : StructuredMesh {node} {};
void local_coords(Position& r) const override { r -= origin_; };
Position local_coords(const Position& r) const override
{
return r - origin_;
};
// Data members
Position origin_ {0.0, 0.0, 0.0}; //!< Origin of the mesh
};
//==============================================================================
//! Tessellation of n-dimensional Euclidean space by congruent squares or cubes
//==============================================================================
@ -352,7 +375,7 @@ public:
int set_grid();
};
class CylindricalMesh : public StructuredMesh {
class CylindricalMesh : public PeriodicStructuredMesh {
public:
// Constructors
CylindricalMesh() = default;
@ -406,7 +429,7 @@ private:
}
};
class SphericalMesh : public StructuredMesh {
class SphericalMesh : public PeriodicStructuredMesh {
public:
// Constructors
SphericalMesh() = default;

View file

@ -9,6 +9,7 @@
#include "xtensor/xadapt.hpp"
#include "xtensor/xarray.hpp"
#include "openmc/position.h"
#include "openmc/vector.h"
namespace openmc {
@ -49,5 +50,8 @@ xt::xarray<T> get_node_xarray(
return xt::adapt(v, shape);
}
Position get_node_position(
pugi::xml_node node, const char* name, bool lowercase = false);
} // namespace openmc
#endif // OPENMC_XML_INTERFACE_H

View file

@ -38,4 +38,4 @@ from .config import *
from openmc.model import rectangular_prism, hexagonal_prism, Model
__version__ = '0.13.3-dev'
__version__ = '0.13.4-dev'

View file

@ -558,9 +558,9 @@ class Decay(EqualityMixin):
raise NotImplementedError("Multiple interpolation regions: {name}, {particle}")
interpolation = INTERPOLATION_SCHEME[f.interpolation[0]]
if interpolation not in ('histogram', 'linear-linear'):
raise NotImplementedError(
warn(
f"Continuous spectra with {interpolation} interpolation "
f"({name}, {particle}) not supported")
f"({name}, {particle}) encountered.")
intensity = spectra['continuous_normalization'].n
rates = decay_constant * intensity * f.y

View file

@ -514,13 +514,13 @@ class IncidentPhoton(EqualityMixin):
# Read each reaction
data = cls(Z)
for mt in (502, 504, 515, 522, 525):
for mt in (502, 504, 517, 522, 525):
data.reactions[mt] = PhotonReaction.from_ace(ace, mt)
# Get heating cross sections [eV-barn] from factors [eV per collision]
# by multiplying with total xs
data.reactions[525].xs.y *= sum([data.reactions[mt].xs.y for mt in
(502, 504, 515, 522)])
(502, 504, 517, 522)])
# Compton profiles
n_shell = ace.nxs[5]
@ -1000,7 +1000,7 @@ class PhotonReaction(EqualityMixin):
elif mt == 504:
# Incoherent scattering
idx = ace.jxs[1] + n
elif mt == 515:
elif mt == 517:
# Pair production
idx = ace.jxs[1] + 4*n
elif mt == 522:
@ -1021,6 +1021,9 @@ class PhotonReaction(EqualityMixin):
else:
nonzero = (xs != 0.0)
xs[nonzero] = np.exp(xs[nonzero])
# Replace zero elements to small non-zero to enable log-log
xs[~nonzero] = np.exp(-500.0)
rx.xs = Tabulated1D(energy, xs, [n], [5])
# Get form factors for incoherent/coherent scattering

View file

@ -15,7 +15,7 @@ from openmc.mpi import comm
from openmc.checkvalue import check_type, check_greater_than
from openmc.data import JOULE_PER_EV, REACTION_MT
from openmc.lib import (
Tally, MaterialFilter, EnergyFilter, EnergyFunctionFilter)
Tally, MaterialFilter, EnergyFilter, EnergyFunctionFilter, load_nuclide)
import openmc.lib
from .abc import (
ReactionRateHelper, NormalizationHelper, FissionYieldHelper)
@ -189,7 +189,7 @@ class DirectReactionRateHelper(ReactionRateHelper):
def reset_tally_means(self):
"""Reset the cached mean rate tallies.
.. note::
This step must be performed after each transport cycle
"""
self._rate_tally_means_cache = None
@ -306,6 +306,12 @@ class FluxCollapseHelper(ReactionRateHelper):
self._rate_tally.filters = [MaterialFilter(materials)]
self._rate_tally_means_cache = None
if self._nuclides_direct is not None:
# check if any direct tally nuclides are requested that are not
# already loaded with the materials. Load separately if so.
mat_nuclides = {n for mat in materials for n in mat.nuclides}
extra_nuclides = set(self._nuclides_direct) - mat_nuclides
for nuc in extra_nuclides:
load_nuclide(nuc)
self._rate_tally.nuclides = self._nuclides_direct
@property
@ -327,7 +333,7 @@ class FluxCollapseHelper(ReactionRateHelper):
def reset_tally_means(self):
"""Reset the cached mean rate and flux tallies.
.. note::
This step must be performed after each transport cycle
"""
self._flux_tally_means_cache = None

View file

@ -398,6 +398,8 @@ class Results(list):
path : PathLike
Path to materials XML file to read. Defaults to 'materials.xml'.
.. versionadded:: 0.13.3
Returns
-------
mat_file : Materials

View file

@ -1349,6 +1349,8 @@ class EnergyFilter(RealFilter):
(e.g., a source spectrum) based on tally results that were obtained from
using an :class:`~openmc.EnergyFilter`.
.. versionadded:: 0.13.3
Parameters
----------
values : iterable of float

View file

@ -537,6 +537,8 @@ class Geometry:
def get_surfaces_by_name(self, name, case_sensitive=False, matching=False):
"""Return a list of surfaces with matching names.
.. versionadded:: 0.13.3
Parameters
----------
name : str

View file

@ -446,7 +446,7 @@ class RegularMesh(StructuredMesh):
if self._width is not None:
self._width = None
warnings.warn("Unsetting width attribute.")
if self.lower_left is not None and any(np.isclose(self.lower_left, upper_right)):
raise ValueError("Mesh cannot have zero thickness in any dimension")
@ -1050,6 +1050,9 @@ class CylindricalMesh(StructuredMesh):
The default value is [0, 2π], i.e. the full phi range.
z_grid : numpy.ndarray
1-D array of mesh boundary points along the z-axis.
origin : numpy.ndarray
1-D array of length 3 the (x,y,z) origin of the mesh in
cartesian coordinates
indices : Iterable of tuple
An iterable of mesh indices for each mesh element, e.g. [(1, 1, 1),
(2, 1, 1), ...]
@ -1062,6 +1065,7 @@ class CylindricalMesh(StructuredMesh):
self._r_grid = None
self._phi_grid = [0.0, 2*pi]
self._z_grid = None
self.origin = (0., 0., 0.)
@property
def dimension(self):
@ -1073,6 +1077,10 @@ class CylindricalMesh(StructuredMesh):
def n_dimension(self):
return 3
@property
def origin(self):
return self._origin
@property
def r_grid(self):
return self._r_grid
@ -1099,6 +1107,12 @@ class CylindricalMesh(StructuredMesh):
for p in range(1, np + 1)
for r in range(1, nr + 1))
@origin.setter
def origin(self, coords):
cv.check_type('mesh origin', coords, Iterable, Real)
cv.check_length("mesh origin", coords, 3)
self._origin = np.asarray(coords)
@r_grid.setter
def r_grid(self, grid):
cv.check_type('mesh r_grid', grid, Iterable, Real)
@ -1118,6 +1132,7 @@ class CylindricalMesh(StructuredMesh):
fmt = '{0: <16}{1}{2}\n'
string = super().__repr__()
string += fmt.format('\tDimensions', '=\t', self.n_dimension)
string += fmt.format('\tOrigin', '=\t', self.origin)
r_grid_str = str(self._r_grid) if self._r_grid is None else len(self._r_grid)
string += fmt.format('\tN R pnts:', '=\t', r_grid_str)
if self._r_grid is not None:
@ -1144,6 +1159,8 @@ class CylindricalMesh(StructuredMesh):
mesh.r_grid = group['r_grid'][()]
mesh.phi_grid = group['phi_grid'][()]
mesh.z_grid = group['z_grid'][()]
if 'origin' in group:
mesh.origin = group['origin'][()]
return mesh
@ -1240,6 +1257,9 @@ class CylindricalMesh(StructuredMesh):
subelement = ET.SubElement(element, "z_grid")
subelement.text = ' '.join(map(str, self.z_grid))
subelement = ET.SubElement(element, "origin")
subelement.text = ' '.join(map(str, self.origin))
return element
@classmethod
@ -1263,6 +1283,8 @@ class CylindricalMesh(StructuredMesh):
mesh.r_grid = [float(x) for x in get_text(elem, "r_grid").split()]
mesh.phi_grid = [float(x) for x in get_text(elem, "phi_grid").split()]
mesh.z_grid = [float(x) for x in get_text(elem, "z_grid").split()]
mesh.origin = [float(x) for x in get_text(elem, "origin", default=[0., 0., 0.]).split()]
return mesh
@property
@ -1304,12 +1326,13 @@ class CylindricalMesh(StructuredMesh):
"""
# create points
pts_cylindrical = self.vertices.T.reshape(-1, 3)
pts_cartesian = np.copy(pts_cylindrical)
r, phi = pts_cylindrical[:, 0], pts_cylindrical[:, 1]
pts_cartesian[:, 0] = r * np.cos(phi)
pts_cartesian[:, 1] = r * np.sin(phi)
r, phi = pts_cylindrical[:, 0], pts_cylindrical[:, 1]
pts_cartesian[:, 0] = r * np.cos(phi) + self.origin[0]
pts_cartesian[:, 1] = r * np.sin(phi) + self.origin[1]
pts_cartesian[:, 2] += self.origin[2]
return super().write_data_to_vtk(
points=pts_cartesian,
filename=filename,
@ -1346,6 +1369,9 @@ class SphericalMesh(StructuredMesh):
phi_grid : numpy.ndarray
1-D array of mesh boundary points along the phi-axis in radians.
The default value is [0, 2π], i.e. the full phi range.
origin : numpy.ndarray
1-D array of length 3 the (x,y,z) origin of the mesh in
cartesian coordinates
indices : Iterable of tuple
An iterable of mesh indices for each mesh element, e.g. [(1, 1, 1),
(2, 1, 1), ...]
@ -1358,6 +1384,7 @@ class SphericalMesh(StructuredMesh):
self._r_grid = None
self._theta_grid = [0, pi]
self._phi_grid = [0, 2*pi]
self.origin = (0., 0., 0.)
@property
def dimension(self):
@ -1369,6 +1396,10 @@ class SphericalMesh(StructuredMesh):
def n_dimension(self):
return 3
@property
def origin(self):
return self._origin
@property
def r_grid(self):
return self._r_grid
@ -1395,6 +1426,12 @@ class SphericalMesh(StructuredMesh):
for t in range(1, nt + 1)
for r in range(1, nr + 1))
@origin.setter
def origin(self, coords):
cv.check_type('mesh origin', coords, Iterable, Real)
cv.check_length("mesh origin", coords, 3)
self._origin = np.asarray(coords)
@r_grid.setter
def r_grid(self, grid):
cv.check_type('mesh r_grid', grid, Iterable, Real)
@ -1414,6 +1451,7 @@ class SphericalMesh(StructuredMesh):
fmt = '{0: <16}{1}{2}\n'
string = super().__repr__()
string += fmt.format('\tDimensions', '=\t', self.n_dimension)
string += fmt.format('\tOrigin', '=\t', self.origin)
r_grid_str = str(self._r_grid) if self._r_grid is None else len(self._r_grid)
string += fmt.format('\tN R pnts:', '=\t', r_grid_str)
if self._r_grid is not None:
@ -1440,6 +1478,8 @@ class SphericalMesh(StructuredMesh):
mesh.r_grid = group['r_grid'][()]
mesh.theta_grid = group['theta_grid'][()]
mesh.phi_grid = group['phi_grid'][()]
if 'origin' in group:
mesh.origin = group['origin'][()]
return mesh
@ -1466,6 +1506,9 @@ class SphericalMesh(StructuredMesh):
subelement = ET.SubElement(element, "phi_grid")
subelement.text = ' '.join(map(str, self.phi_grid))
subelement = ET.SubElement(element, "origin")
subelement.text = ' '.join(map(str, self.origin))
return element
@classmethod
@ -1489,6 +1532,8 @@ class SphericalMesh(StructuredMesh):
mesh.r_grid = [float(x) for x in get_text(elem, "r_grid").split()]
mesh.theta_grid = [float(x) for x in get_text(elem, "theta_grid").split()]
mesh.phi_grid = [float(x) for x in get_text(elem, "phi_grid").split()]
mesh.origin = [float(x) for x in get_text(elem, "origin", default=[0., 0., 0.]).split()]
return mesh
@property
@ -1530,12 +1575,13 @@ class SphericalMesh(StructuredMesh):
"""
# create points
pts_spherical = self.vertices.T.reshape(-1, 3)
pts_cartesian = np.copy(pts_spherical)
r, theta, phi = pts_spherical[:, 0], pts_spherical[:, 1], pts_spherical[:, 2]
pts_cartesian[:, 0] = r * np.sin(phi) * np.cos(theta)
pts_cartesian[:, 1] = r * np.sin(phi) * np.sin(theta)
pts_cartesian[:, 2] = r * np.cos(phi)
pts_cartesian[:, 0] = r * np.sin(phi) * np.cos(theta) + self.origin[0]
pts_cartesian[:, 1] = r * np.sin(phi) * np.sin(theta) + self.origin[1]
pts_cartesian[:, 2] = r * np.cos(phi) + self.origin[2]
return super().write_data_to_vtk(
points=pts_cartesian,

View file

@ -72,6 +72,11 @@ class Library:
Number of equi-width polar angle bins for angle discretization
num_azimuthal : Integral
Number of equi-width azimuthal angle bins for angle discretization
nuclides : Iterable of str or 'sum'
The optional user-specified nuclides for which to compute cross
sections (e.g., 'U238', 'O16'). If by_nuclide is True but nuclides
are not specified by the user, all nuclides in the domain
are included.
estimator : str or None
The tally estimator used to compute multi-group cross sections.
If None, the default for each MGXS type is used.
@ -107,6 +112,7 @@ class Library:
self._energy_groups = None
self._num_polar = 1
self._num_azimuthal = 1
self._nuclides = None
self._num_delayed_groups = 0
self._correction = 'P0'
self._scatter_format = 'legendre'
@ -145,6 +151,7 @@ class Library:
clone._energy_groups = copy.deepcopy(self.energy_groups, memo)
clone._num_polar = self.num_polar
clone._num_azimuthal = self.num_azimuthal
clone._nuclides = self._nuclides
clone._num_delayed_groups = self.num_delayed_groups
clone._tally_trigger = copy.deepcopy(self.tally_trigger, memo)
clone._all_mgxs = copy.deepcopy(self.all_mgxs)
@ -205,6 +212,10 @@ class Library:
else:
return self._domains
@property
def nuclides(self):
return self._nuclides
@property
def energy_groups(self):
return self._energy_groups
@ -275,6 +286,11 @@ class Library:
cv.check_type('name', name, str)
self._name = name
@nuclides.setter
def nuclides(self, nuclides):
cv.check_iterable_type('nuclides', nuclides, str)
self._nuclides = nuclides
@mgxs_types.setter
def mgxs_types(self, mgxs_types):
all_mgxs_types = openmc.mgxs.MGXS_TYPES + openmc.mgxs.MDGXS_TYPES + \
@ -524,6 +540,20 @@ class Library:
mgxs.legendre_order = self.legendre_order
mgxs.histogram_bins = self.histogram_bins
if self.by_nuclide:
try:
domain_nuclides = domain.get_nuclides()
except AttributeError:
domain_nuclides = None
if self.nuclides:
if domain_nuclides:
mgxs.nuclides = [
nuclide for nuclide in self.nuclides
if nuclide in domain_nuclides
] + ["total"]
else:
mgxs.nuclides = self.nuclides
self.all_mgxs[domain.id][mgxs_type] = mgxs
def add_to_tallies_file(self, tallies_file, merge=True):
@ -590,7 +620,7 @@ class Library:
self._sp_filename = statepoint._f.filename
self._geometry = statepoint.summary.geometry
self._nuclides = statepoint.summary.nuclides
self._atomic_weight_ratios = statepoint.summary.nuclides
if statepoint.run_mode == 'eigenvalue':
self._keff = statepoint.keff.n
@ -1005,7 +1035,7 @@ class Library:
xsdata.num_azimuthal = self.num_azimuthal
if nuclide != 'total':
xsdata.atomic_weight_ratio = self._nuclides[nuclide]
xsdata.atomic_weight_ratio = self._atomic_weight_ratios[nuclide]
if subdomain is None:
subdomain = 'all'

View file

@ -596,7 +596,8 @@ class Model:
def run(self, particles=None, threads=None, geometry_debug=False,
restart_file=None, tracks=False, output=True, cwd='.',
openmc_exec='openmc', mpi_args=None, event_based=None):
openmc_exec='openmc', mpi_args=None, event_based=None,
export_model_xml=True):
"""Runs OpenMC. If the C API has been initialized, then the C API is
used, otherwise, this method creates the XML files and runs OpenMC via
a system call. In both cases this method returns the path to the last
@ -639,6 +640,11 @@ class Model:
event_based : None or bool, optional
Turns on event-based parallelism if True. If None, the value in
the Settings will be used.
export_model_xml : bool, optional
Exports a single model.xml file rather than separate files.
Defaults to True.
.. versionadded:: 0.13.3
Returns
-------
@ -688,7 +694,10 @@ class Model:
else:
# Then run via the command line
self.export_to_xml()
if export_model_xml:
self.export_to_model_xml()
else:
self.export_to_xml()
openmc.run(particles, threads, geometry_debug, restart_file,
tracks, output, Path('.'), openmc_exec, mpi_args,
event_based)

View file

@ -632,6 +632,8 @@ class ZConeOneSided(CompositeSurface):
class Polygon(CompositeSurface):
"""Create a polygon composite surface from a path of closed points.
.. versionadded:: 0.13.3
Parameters
----------
points : np.ndarray
@ -659,21 +661,10 @@ class Polygon(CompositeSurface):
def __init__(self, points, basis='rz'):
check_value('basis', basis, ('xy', 'yz', 'xz', 'rz'))
self._basis = basis
points = np.asarray(points, dtype=float)
check_iterable_type('points', points, float, min_depth=2, max_depth=2)
check_length('points', points[0, :], 2, 2)
# If the last point is the same as the first, remove it and make sure
# there are still at least 3 points for a valid polygon.
if np.allclose(points[0, :], points[-1, :]):
points = points[:-1, :]
check_length('points', points, 3)
# Order the points counter-clockwise (necessary for offset method)
self._points = self._make_ccw(points)
# Create a triangulation of the points.
self._tri = Delaunay(self._points, qhull_options='QJ')
# Create a constrained triangulation of the validated points.
# The constrained triangulation is set to the _tri attribute
self._constrain_triangulation(self._validate_points(points))
# Decompose the polygon into groups of simplices forming convex subsets
# and get the sets of (surface, operator) pairs defining the polygon
@ -723,7 +714,7 @@ class Polygon(CompositeSurface):
@property
def points(self):
return self._points
return self._tri.points
@property
def basis(self):
@ -738,7 +729,7 @@ class Polygon(CompositeSurface):
# Get the unit vectors that point from one point in the polygon to the
# next given that they are ordered counterclockwise and that the final
# point is connected to the first point
tangents = np.diff(self._points, axis=0, append=[self._points[0, :]])
tangents = np.diff(self.points, axis=0, append=[self.points[0, :]])
tangents /= np.linalg.norm(tangents, axis=-1, keepdims=True)
# Rotate the tangent vectors clockwise by 90 degrees, which for a
# counter-clockwise ordered polygon will produce the outward normal
@ -761,8 +752,9 @@ class Polygon(CompositeSurface):
def region(self):
return self._region
def _make_ccw(self, points):
"""Order a set of points counter-clockwise.
def _validate_points(self, points):
"""Ensure the closed path defined by points does not intersect and is
oriented counter-clockwise.
Parameters
----------
@ -773,15 +765,145 @@ class Polygon(CompositeSurface):
-------
ordered_points : the input points ordered counter-clockwise
"""
points = np.asarray(points, dtype=float)
check_iterable_type('points', points, float, min_depth=2, max_depth=2)
check_length('points', points[0, :], 2, 2)
# If the last point is the same as the first, remove it and make sure
# there are still at least 3 points for a valid polygon.
if np.allclose(points[0, :], points[-1, :]):
points = points[:-1, :]
check_length('points', points, 3)
if len(points) != len(np.unique(points, axis=0)):
raise ValueError('Duplicate points were detected in the Polygon input')
# Order the points counter-clockwise (necessary for offset method)
# Calculates twice the signed area of the polygon using the "Shoelace
# Formula" https://en.wikipedia.org/wiki/Shoelace_formula
# If signed area is positive the curve is oriented counter-clockwise.
# If the signed area is negative the curve is oriented clockwise.
xpts, ypts = points.T
if np.sum(ypts*(np.roll(xpts, 1) - np.roll(xpts, -1))) < 0:
points = points[::-1, :]
# If signed area is positive the curve is oriented counter-clockwise
if np.sum(ypts*(np.roll(xpts, 1) - np.roll(xpts, -1))) > 0:
return points
# Check if polygon is self-intersecting by comparing edges pairwise
n = len(points)
for i in range(n):
p0 = points[i, :]
p1 = points[(i + 1) % n, :]
for j in range(i + 1, n):
p2 = points[j, :]
p3 = points[(j + 1) % n, :]
# Compute orientation of p0 wrt p2->p3 line segment
cp0 = np.cross(p3-p0, p2-p0)
# Compute orientation of p1 wrt p2->p3 line segment
cp1 = np.cross(p3-p1, p2-p1)
# Compute orientation of p2 wrt p0->p1 line segment
cp2 = np.cross(p1-p2, p0-p2)
# Compute orientation of p3 wrt p0->p1 line segment
cp3 = np.cross(p1-p3, p0-p3)
return points[::-1, :]
# Group cross products in an array and find out how many are 0
cross_products = np.array([[cp0, cp1], [cp2, cp3]])
cps_near_zero = np.isclose(cross_products, 0).astype(int)
num_zeros = np.sum(cps_near_zero)
# Topologies of 2 finite line segments categorized by the number
# of zero-valued cross products:
#
# 0: No 3 points lie on the same line
# 1: 1 point lies on the same line defined by the other line
# segment, but is not coincident with either of the points
# 2: 2 points are coincident, but the line segments are not
# collinear which guarantees no intersection
# 3: not possible, except maybe floating point issues?
# 4: Both line segments are collinear, simply need to check if
# they overlap or not
# adapted from algorithm linked below and modified to only
# consider intersections on the interior of line segments as
# proper intersections: i.e. segments sharing end points do not
# count as intersections.
# https://www.geeksforgeeks.org/check-if-two-given-line-segments-intersect/
if num_zeros == 0:
# If the orientations of p0 and p1 have opposite signs
# and the orientations of p2 and p3 have opposite signs
# then there is an intersection.
if all(np.prod(cross_products, axis=-1) < 0):
raise ValueError('Polygon cannot be self-intersecting')
continue
elif num_zeros == 1:
# determine which line segment has 2 out of the 3 collinear
# points
idx = np.argwhere(np.sum(cps_near_zero, axis=-1) == 0)
if np.prod(cross_products[idx, :]) < 0:
raise ValueError('Polygon cannot be self-intersecting')
continue
elif num_zeros == 2:
continue
elif num_zeros == 3:
warnings.warn('Unclear if Polygon is self-intersecting')
continue
else:
# All 4 cross products are zero
# Determine number of unique points, x span and y span for
# both line segments
xmin1, xmax1 = min(p0[0], p1[0]), max(p0[0], p1[0])
ymin1, ymax1 = min(p0[1], p1[1]), max(p0[1], p1[1])
xmin2, xmax2 = min(p2[0], p3[0]), max(p2[0], p3[0])
ymin2, ymax2 = min(p2[1], p3[1]), max(p2[1], p3[1])
xlap = xmin1 < xmax2 and xmin2 < xmax1
ylap = ymin1 < ymax2 and ymin2 < ymax1
if xlap or ylap:
raise ValueError('Polygon cannot be self-intersecting')
continue
return points
def _constrain_triangulation(self, points, depth=0):
"""Generate a constrained triangulation by ensuring all edges of the
Polygon are contained within the simplices.
Parameters
----------
points : np.ndarray (Nx2)
An Nx2 array of coordinate pairs describing the vertices. These
points represent a planar straight line graph.
Returns
-------
None
"""
# Only attempt the triangulation up to 3 times.
if depth > 2:
raise RuntimeError('Could not create a valid triangulation after 3'
' attempts')
tri = Delaunay(points, qhull_options='QJ')
# Loop through the boundary edges of the polygon. If an edge is not
# included in the triangulation, break it into two line segments.
n = len(points)
new_pts = []
for i, j in zip(range(n), range(1, n +1)):
# If both vertices of any edge are not found in any simplex, insert
# a new point between them.
if not any([i in s and j % n in s for s in tri.simplices]):
newpt = (points[i, :] + points[j % n, :]) / 2
new_pts.append((j, newpt))
# If all the edges are included in the triangulation set it, otherwise
# try again with additional points inserted on offending edges.
if not new_pts:
self._tri = tri
else:
for i, pt in new_pts[::-1]:
points = np.insert(points, i, pt, axis=0)
self._constrain_triangulation(points, depth=depth + 1)
def _group_simplices(self, neighbor_map, group=None):
"""Generate a convex grouping of simplices.
@ -807,7 +929,7 @@ class Polygon(CompositeSurface):
if group is None:
sidx = next(iter(neighbor_map))
return self._group_simplices(neighbor_map, group=[sidx])
# Otherwise use the last simplex in the group
# Otherwise use the last simplex in the group
else:
sidx = group[-1]
# Remove current simplex from dictionary since it is in a group
@ -819,7 +941,7 @@ class Polygon(CompositeSurface):
continue
test_group = group + [n]
test_point_idx = np.unique(self._tri.simplices[test_group, :])
test_points = self._tri.points[test_point_idx]
test_points = self.points[test_point_idx]
# If test_points are convex keep adding to this group
if len(test_points) == len(ConvexHull(test_points).vertices):
group = self._group_simplices(neighbor_map, group=test_group)
@ -902,8 +1024,8 @@ class Polygon(CompositeSurface):
# Get centroids of all the simplices and determine if they are inside
# the polygon defined by input vertices or not.
centroids = np.mean(self._points[self._tri.simplices], axis=1)
in_polygon = Path(self._points).contains_points(centroids)
centroids = np.mean(self.points[self._tri.simplices], axis=1)
in_polygon = Path(self.points).contains_points(centroids)
self._in_polygon = in_polygon
# Build a map with keys of simplex indices inside the polygon whose
@ -931,7 +1053,7 @@ class Polygon(CompositeSurface):
# generate the convex hull and find the resulting surfaces and
# unary operators that represent this convex subset of the polygon.
idx = np.unique(self._tri.simplices[group, :])
qhull = ConvexHull(self._tri.points[idx, :])
qhull = ConvexHull(self.points[idx, :])
surf_ops = self._get_convex_hull_surfs(qhull)
surfsets.append(surf_ops)
return surfsets

View file

@ -683,11 +683,11 @@ class Plot(IDManagerMixin):
if self._meshlines is not None:
subelement = ET.SubElement(element, "meshlines")
subelement.set("meshtype", self._meshlines['type'])
if self._meshlines['id'] is not None:
if 'id' in self._meshlines:
subelement.set("id", str(self._meshlines['id']))
if self._meshlines['linewidth'] is not None:
if 'linewidth' in self._meshlines:
subelement.set("linewidth", str(self._meshlines['linewidth']))
if self._meshlines['color'] is not None:
if 'color' in self._meshlines:
subelement.set("color", ' '.join(map(
str, self._meshlines['color'])))

View file

@ -53,16 +53,19 @@ _MIN_E = 1.e-5
_MAX_E = 20.e6
def plot_xs(this, types, divisor_types=None, temperature=294., data_type=None,
axis=None, sab_name=None, ce_cross_sections=None,
mg_cross_sections=None, enrichment=None, plot_CE=True, orders=None,
divisor_orders=None, **kwargs):
ELEMENT_NAMES = list(openmc.data.ELEMENT_SYMBOL.values())[1:]
def plot_xs(this, types, divisor_types=None, temperature=294., axis=None,
sab_name=None, ce_cross_sections=None, mg_cross_sections=None,
enrichment=None, plot_CE=True, orders=None, divisor_orders=None,
**kwargs):
"""Creates a figure of continuous-energy cross sections for this item.
Parameters
----------
this : str or openmc.Material
Object to source data from
Object to source data from. Nuclides and elements can be input as a str
types : Iterable of values of PLOT_TYPES
The type of cross sections to include in the plot.
divisor_types : Iterable of values of PLOT_TYPES, optional
@ -74,23 +77,18 @@ def plot_xs(this, types, divisor_types=None, temperature=294., data_type=None,
temperature of 294K will be plotted. Note that the nearest
temperature in the library for each nuclide will be used as opposed
to using any interpolation.
data_type : {'nuclide', 'element', 'material', 'macroscopic'}, optional
Type of object to plot. If not specified, a guess is made based on the
`this` argument.
axis : matplotlib.axes, optional
A previously generated axis to use for plotting. If not specified,
a new axis and figure will be generated.
sab_name : str, optional
Name of S(a,b) library to apply to MT=2 data when applicable; only used
for items which are instances of openmc.Element or openmc.Nuclide
Name of S(a,b) library to apply to MT=2 data when applicable.
ce_cross_sections : str, optional
Location of cross_sections.xml file. Default is None.
mg_cross_sections : str, optional
Location of MGXS HDF5 Library file. Default is None.
enrichment : float, optional
Enrichment for U235 in weight percent. For example, input 4.95 for
4.95 weight percent enriched U. Default is None. This is only used for
items which are instances of openmc.Element
4.95 weight percent enriched U. Default is None.
plot_CE : bool, optional
Denotes whether or not continuous-energy will be plotted. Defaults to
plotting the continuous-energy data.
@ -101,7 +99,7 @@ def plot_xs(this, types, divisor_types=None, temperature=294., data_type=None,
multi-group data.
divisor_orders : Iterable of Integral, optional
Same as orders, but for divisor_types
**kwargs
**kwargs :
All keyword arguments are passed to
:func:`matplotlib.pyplot.figure`.
@ -117,27 +115,11 @@ def plot_xs(this, types, divisor_types=None, temperature=294., data_type=None,
import matplotlib.pyplot as plt
cv.check_type("plot_CE", plot_CE, bool)
if data_type is None:
if isinstance(this, openmc.Nuclide):
data_type = 'nuclide'
elif isinstance(this, openmc.Element):
data_type = 'element'
elif isinstance(this, openmc.Material):
data_type = 'material'
elif isinstance(this, openmc.Macroscopic):
data_type = 'macroscopic'
elif isinstance(this, str):
if this[-1] in string.digits:
data_type = 'nuclide'
else:
data_type = 'element'
else:
raise TypeError("Invalid type for plotting")
cv.check_type("this", this, (str, openmc.Material))
if plot_CE:
# Calculate for the CE cross sections
E, data = calculate_cexs(this, data_type, types, temperature, sab_name,
E, data = calculate_cexs(this, types, temperature, sab_name,
ce_cross_sections, enrichment)
if divisor_types:
cv.check_length('divisor types', divisor_types, len(types))
@ -160,13 +142,13 @@ def plot_xs(this, types, divisor_types=None, temperature=294., data_type=None,
data = data_new
else:
# Calculate for MG cross sections
E, data = calculate_mgxs(this, data_type, types, orders, temperature,
E, data = calculate_mgxs(this, types, orders, temperature,
mg_cross_sections, ce_cross_sections,
enrichment)
if divisor_types:
cv.check_length('divisor types', divisor_types, len(types))
Ediv, data_div = calculate_mgxs(this, data_type, divisor_types,
Ediv, data_div = calculate_mgxs(this, divisor_types,
divisor_orders, temperature,
mg_cross_sections,
ce_cross_sections, enrichment)
@ -179,7 +161,7 @@ def plot_xs(this, types, divisor_types=None, temperature=294., data_type=None,
# Generate the plot
if axis is None:
fig, ax = plt.subplots()
fig, ax = plt.subplots(**kwargs)
else:
fig = None
ax = axis
@ -201,23 +183,30 @@ def plot_xs(this, types, divisor_types=None, temperature=294., data_type=None,
ax.set_xlim(_MIN_E, _MAX_E)
else:
ax.set_xlim(E[-1], E[0])
if divisor_types:
if data_type == 'nuclide':
ylabel = 'Nuclidic Microscopic Data'
elif data_type == 'element':
ylabel = 'Elemental Microscopic Data'
elif data_type == 'material' or data_type == 'macroscopic':
if isinstance(this, str):
if this in ELEMENT_NAMES:
ylabel = 'Elemental Microscopic Data'
else:
ylabel = 'Nuclide Microscopic Data'
elif isinstance(this, openmc.Material):
ylabel = 'Macroscopic Data'
else:
raise TypeError("Invalid type for plotting")
else:
if data_type == 'nuclide':
ylabel = 'Microscopic Cross Section [b]'
elif data_type == 'element':
ylabel = 'Elemental Cross Section [b]'
elif data_type == 'material' or data_type == 'macroscopic':
if isinstance(this, str):
if this in ELEMENT_NAMES:
ylabel = 'Elemental Cross Section [b]'
else:
ylabel = 'Microscopic Cross Section [b]'
elif isinstance(this, openmc.Material):
ylabel = 'Macroscopic Cross Section [1/cm]'
else:
raise TypeError("Invalid type for plotting")
ax.set_ylabel(ylabel)
ax.legend(loc='best')
name = this.name if data_type == 'material' else this
name = this.name if isinstance(this, openmc.Material) else this
if len(types) > 1:
ax.set_title('Cross Sections for ' + name)
else:
@ -226,16 +215,15 @@ def plot_xs(this, types, divisor_types=None, temperature=294., data_type=None,
return fig
def calculate_cexs(this, data_type, types, temperature=294., sab_name=None,
def calculate_cexs(this, types, temperature=294., sab_name=None,
cross_sections=None, enrichment=None):
"""Calculates continuous-energy cross sections of a requested type.
Parameters
----------
this : {str, openmc.Nuclide, openmc.Element, openmc.Material}
Object to source data from
data_type : {'nuclide', 'element', 'material'}
Type of object to plot
this : str or openmc.Material
Object to source data from. Nuclides and elements should be input as a
str
types : Iterable of values of PLOT_TYPES
The type of cross sections to calculate
temperature : float, optional
@ -262,39 +250,33 @@ def calculate_cexs(this, data_type, types, temperature=294., sab_name=None,
"""
# Check types
cv.check_type('this', this, (str, openmc.Material))
cv.check_type('temperature', temperature, Real)
if sab_name:
cv.check_type('sab_name', sab_name, str)
if enrichment:
cv.check_type('enrichment', enrichment, Real)
if data_type == 'nuclide':
if isinstance(this, str):
nuc = openmc.Nuclide(this)
if isinstance(this, str):
if this in ELEMENT_NAMES:
energy_grid, data = _calculate_cexs_elem_mat(
this, types, temperature, cross_sections, sab_name, enrichment
)
else:
nuc = this
energy_grid, xs = _calculate_cexs_nuclide(nuc, types, temperature,
sab_name, cross_sections)
# Convert xs (Iterable of Callable) to a grid of cross section values
# calculated on the points in energy_grid for consistency with the
# element and material functions.
data = np.zeros((len(types), len(energy_grid)))
for line in range(len(types)):
data[line, :] = xs[line](energy_grid)
elif data_type == 'element':
if isinstance(this, str):
elem = openmc.Element(this)
else:
elem = this
energy_grid, data = _calculate_cexs_elem_mat(elem, types, temperature,
cross_sections, sab_name,
enrichment)
elif data_type == 'material':
cv.check_type('this', this, openmc.Material)
energy_grid, xs = _calculate_cexs_nuclide(
this, types, temperature, sab_name, cross_sections
)
# Convert xs (Iterable of Callable) to a grid of cross section values
# calculated on the points in energy_grid for consistency with the
# element and material functions.
data = np.zeros((len(types), len(energy_grid)))
for line in range(len(types)):
data[line, :] = xs[line](energy_grid)
else:
energy_grid, data = _calculate_cexs_elem_mat(this, types, temperature,
cross_sections)
else:
raise TypeError("Invalid type")
return energy_grid, data
@ -305,7 +287,7 @@ def _calculate_cexs_nuclide(this, types, temperature=294., sab_name=None,
Parameters
----------
this : openmc.Nuclide
this : str
Nuclide object to source data from
types : Iterable of str or Integral
The type of cross sections to calculate; values can either be those
@ -502,8 +484,8 @@ def _calculate_cexs_elem_mat(this, types, temperature=294.,
Parameters
----------
this : openmc.Material or openmc.Element
Object to source data from
this : openmc.Material or str
Object to source data from. Element can be input as str
types : Iterable of values of PLOT_TYPES
The type of cross sections to calculate
temperature : float, optional
@ -544,18 +526,16 @@ def _calculate_cexs_elem_mat(this, types, temperature=294.,
# Expand elements in to nuclides with atomic densities
nuc_fractions = this.get_nuclide_atom_densities()
# Create a dict of [nuclide name] = nuclide object to carry forward
# with a common nuclides format between openmc.Material and
# openmc.Element objects
# with a common nuclides format between openmc.Material and Elements
nuclides = {nuclide: nuclide for nuclide in nuc_fractions}
else:
# Expand elements in to nuclides with atomic densities
nuclides = this.expand(1., 'ao', enrichment=enrichment,
nuclides = openmc.Element(this).expand(1., 'ao', enrichment=enrichment,
cross_sections=cross_sections)
# For ease of processing split out the nuclide and its fraction
nuc_fractions = {nuclide[0]: nuclide[1] for nuclide in nuclides}
# Create a dict of [nuclide name] = nuclide object to carry forward
# with a common nuclides format between openmc.Material and
# openmc.Element objects
# with a common nuclides format between openmc.Material and Elements
nuclides = {nuclide[0]: nuclide[0] for nuclide in nuclides}
# Identify the nuclides which have S(a,b) data
@ -583,8 +563,7 @@ def _calculate_cexs_elem_mat(this, types, temperature=294.,
name = nuclide[0]
nuc = nuclide[1]
sab_tab = sabs[name]
temp_E, temp_xs = calculate_cexs(nuc, 'nuclide', types, T, sab_tab,
cross_sections)
temp_E, temp_xs = calculate_cexs(nuc, types, T, sab_tab, cross_sections)
E.append(temp_E)
# Since the energy grids are different, store the cross sections as
# a tabulated function so they can be calculated on any grid needed.
@ -611,7 +590,7 @@ def _calculate_cexs_elem_mat(this, types, temperature=294.,
return energy_grid, data
def calculate_mgxs(this, data_type, types, orders=None, temperature=294.,
def calculate_mgxs(this, types, orders=None, temperature=294.,
cross_sections=None, ce_cross_sections=None,
enrichment=None):
"""Calculates multi-group cross sections of a requested type.
@ -623,9 +602,7 @@ def calculate_mgxs(this, data_type, types, orders=None, temperature=294.,
Parameters
----------
this : str or openmc.Material
Object to source data from
data_type : {'nuclide', 'element', 'material', 'macroscopic'}
Type of object to plot
Object to source data from. Nuclides and elements can be input as a str
types : Iterable of values of PLOT_TYPES_MGXS
The type of cross sections to calculate
orders : Iterable of Integral, optional
@ -641,7 +618,6 @@ def calculate_mgxs(this, data_type, types, orders=None, temperature=294.,
Location of MGXS HDF5 Library file. Default is None.
ce_cross_sections : str, optional
Location of continuous-energy cross_sections.xml file. Default is None.
This is used only for expanding an openmc.Element object passed as this
enrichment : float, optional
Enrichment for U235 in weight percent. For example, input 4.95 for
4.95 weight percent enriched U. Default is None
@ -665,13 +641,13 @@ def calculate_mgxs(this, data_type, types, orders=None, temperature=294.,
cv.check_type("cross_sections", cross_sections, str)
library = openmc.MGXSLibrary.from_hdf5(cross_sections)
if data_type in ('nuclide', 'macroscopic'):
mgxs = _calculate_mgxs_nuc_macro(this, types, library, orders,
temperature)
elif data_type in ('element', 'material'):
if this in ELEMENT_NAMES or isinstance(this, openmc.Material):
mgxs = _calculate_mgxs_elem_mat(this, types, library, orders,
temperature, ce_cross_sections,
enrichment)
elif isinstance(this, str):
mgxs = _calculate_mgxs_nuc_macro(this, types, library, orders,
temperature)
else:
raise TypeError("Invalid type")
@ -703,7 +679,7 @@ def _calculate_mgxs_nuc_macro(this, types, library, orders=None,
Parameters
----------
this : openmc.Nuclide or openmc.Macroscopic
this : str
Object to source data from
types : Iterable of str
The type of cross sections to calculate; values can either be those
@ -841,8 +817,8 @@ def _calculate_mgxs_elem_mat(this, types, library, orders=None,
Parameters
----------
this : openmc.Element or openmc.Material
Object to source data from
this : str or openmc.Material
Object to source data from. Elements can be input as a str
types : Iterable of str
The type of cross sections to calculate; values can either be those
in openmc.PLOT_TYPES_MGXS
@ -891,7 +867,7 @@ def _calculate_mgxs_elem_mat(this, types, library, orders=None,
else:
T = temperature
# Expand elements in to nuclides with atomic densities
nuclides = this.expand(100., 'ao', enrichment=enrichment,
nuclides = openmc.Element(this).expand(100., 'ao', enrichment=enrichment,
cross_sections=ce_cross_sections)
# For ease of processing split out nuc and nuc_fractions

View file

@ -834,10 +834,6 @@ class Tabular(Univariate):
self._interpolation = interpolation
def cdf(self):
if not self.interpolation in ('histogram', 'linear-linear'):
raise NotImplementedError('Can only generate CDFs for tabular '
'distributions using histogram or '
'linear-linear interpolation')
c = np.zeros_like(self.x)
x = self.x
p = self.p
@ -846,15 +842,16 @@ class Tabular(Univariate):
c[1:] = p[:-1] * np.diff(x)
elif self.interpolation == 'linear-linear':
c[1:] = 0.5 * (p[:-1] + p[1:]) * np.diff(x)
else:
raise NotImplementedError('Can only generate CDFs for tabular '
'distributions using histogram or '
'linear-linear interpolation')
return np.cumsum(c)
def mean(self):
"""Compute the mean of the tabular distribution"""
if not self.interpolation in ('histogram', 'linear-linear'):
raise NotImplementedError('Can only compute mean for tabular '
'distributions using histogram '
'or linear-linear interpolation.')
if self.interpolation == 'linear-linear':
mean = 0.0
for i in range(1, len(self.x)):
@ -875,6 +872,10 @@ class Tabular(Univariate):
x_r = self.x[1:]
p_l = self.p[:-1]
mean = (0.5 * (x_l + x_r) * (x_r - x_l) * p_l).sum()
else:
raise NotImplementedError('Can only compute mean for tabular '
'distributions using histogram '
'or linear-linear interpolation.')
# Normalize for when integral of distribution is not 1
mean /= self.integral()
@ -886,10 +887,6 @@ class Tabular(Univariate):
self.p /= self.cdf().max()
def sample(self, n_samples=1, seed=None):
if not self.interpolation in ('histogram', 'linear-linear'):
raise NotImplementedError('Can only sample tabular distributions '
'using histogram or '
'linear-linear interpolation')
np.random.seed(seed)
xi = np.random.rand(n_samples)
@ -942,6 +939,11 @@ class Tabular(Univariate):
m[non_zero] = x_i[non_zero] + (np.sqrt(quad) - p_i[non_zero]) / m[non_zero]
samples_out = m
else:
raise NotImplementedError('Can only sample tabular distributions '
'using histogram or '
'linear-linear interpolation')
assert all(samples_out < self.x[-1])
return samples_out

View file

@ -1436,6 +1436,8 @@ class Tally(IDManagerMixin):
dimensions. This will result in more than one dimension per filter
for the returned data array.
.. versionadded:: 0.13.3
Returns
-------
numpy.ndarray

View file

@ -58,6 +58,7 @@ kwargs = {
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
],
# Dependencies

View file

@ -291,7 +291,7 @@ CSGCell::CSGCell(pugi::xml_node cell_node)
if (fill_present) {
fill_ = std::stoi(get_node_value(cell_node, "fill"));
if (fill_ == universe_) {
fatal_error(fmt::format("Cell {} is filled with the same universe that"
fatal_error(fmt::format("Cell {} is filled with the same universe that "
"it is contained in.",
id_));
}

View file

@ -19,32 +19,31 @@
namespace openmc {
//==============================================================================
// Discrete implementation
// DiscreteIndex implementation
//==============================================================================
Discrete::Discrete(pugi::xml_node node)
DiscreteIndex::DiscreteIndex(pugi::xml_node node)
{
auto params = get_node_array<double>(node, "parameters");
std::size_t n = params.size() / 2;
std::size_t n = params.size();
std::vector<double> x_vec(params.begin(), params.begin() + n / 2);
std::vector<double> p_vec(params.begin() + n / 2, params.end());
this->init_alias(x_vec, p_vec);
assign(params.data() + n, n);
}
Discrete::Discrete(const double* x, const double* p, int n)
DiscreteIndex::DiscreteIndex(const double* p, int n)
{
std::vector<double> x_vec(x, x + n);
std::vector<double> p_vec(p, p + n);
this->init_alias(x_vec, p_vec);
assign(p, n);
}
void Discrete::init_alias(vector<double>& x, vector<double>& p)
void DiscreteIndex::assign(const double* p, int n)
{
prob_.assign(p, p + n);
this->init_alias();
}
void DiscreteIndex::init_alias()
{
x_ = x;
prob_ = p;
normalize();
// The initialization and sampling method is based on Vose
@ -53,13 +52,14 @@ void Discrete::init_alias(vector<double>& x, vector<double>& p)
vector<size_t> large;
vector<size_t> small;
size_t n = prob_.size();
// Set and allocate memory
vector<size_t> alias(x_.size(), 0);
alias_ = alias;
alias_.assign(n, 0);
// Fill large and small vectors based on 1/n
for (size_t i = 0; i < x_.size(); i++) {
prob_[i] *= x_.size();
for (size_t i = 0; i < n; i++) {
prob_[i] *= n;
if (prob_[i] > 1.0) {
large.push_back(i);
} else {
@ -86,23 +86,23 @@ void Discrete::init_alias(vector<double>& x, vector<double>& p)
}
}
double Discrete::sample(uint64_t* seed) const
size_t DiscreteIndex::sample(uint64_t* seed) const
{
// Alias sampling of discrete distribution
int n = x_.size();
size_t n = prob_.size();
if (n > 1) {
int u = prn(seed) * n;
size_t u = prn(seed) * n;
if (prn(seed) < prob_[u]) {
return x_[u];
return u;
} else {
return x_[alias_[u]];
return alias_[u];
}
} else {
return x_[0];
return 0;
}
}
void Discrete::normalize()
void DiscreteIndex::normalize()
{
// Renormalize density function so that it sums to unity
double norm = std::accumulate(prob_.begin(), prob_.end(), 0.0);
@ -111,6 +111,30 @@ void Discrete::normalize()
}
}
//==============================================================================
// Discrete implementation
//==============================================================================
Discrete::Discrete(pugi::xml_node node) : di_(node)
{
auto params = get_node_array<double>(node, "parameters");
std::size_t n = params.size() / 2;
x_.assign(params.begin(), params.begin() + n);
}
Discrete::Discrete(const double* x, const double* p, int n) : di_(p, n)
{
x_.assign(x, x + n);
}
double Discrete::sample(uint64_t* seed) const
{
return x_[di_.sample(seed)];
}
//==============================================================================
// Uniform implementation
//==============================================================================

View file

@ -210,16 +210,11 @@ MeshSpatial::MeshSpatial(pugi::xml_node node)
}
int32_t n_bins = this->n_sources();
std::vector<double> strengths(n_bins, 0.0);
mesh_CDF_.resize(n_bins + 1);
mesh_CDF_[0] = {0.0};
total_strength_ = 0.0;
std::vector<double> strengths(n_bins, 1.0);
// Create cdfs for sampling for an element over a mesh
// Volume scheme is weighted by the volume of each tet
// File scheme is weighted by an array given in the xml file
mesh_strengths_ = std::vector<double>(n_bins, 1.0);
if (check_for_node(node, "strengths")) {
strengths = get_node_array<double>(node, "strengths");
if (strengths.size() != n_bins) {
@ -228,36 +223,21 @@ MeshSpatial::MeshSpatial(pugi::xml_node node)
"not match the number of entities in mesh {} ({}).",
strengths.size(), mesh_id, n_bins));
}
mesh_strengths_ = std::move(strengths);
}
if (get_node_value_bool(node, "volume_normalized")) {
for (int i = 0; i < n_bins; i++) {
mesh_strengths_[i] *= mesh()->volume(i);
strengths[i] *= mesh()->volume(i);
}
}
total_strength_ =
std::accumulate(mesh_strengths_.begin(), mesh_strengths_.end(), 0.0);
for (int i = 0; i < n_bins; i++) {
mesh_CDF_[i + 1] = mesh_CDF_[i] + mesh_strengths_[i] / total_strength_;
}
if (fabs(mesh_CDF_.back() - 1.0) > FP_COINCIDENT) {
fatal_error(
fmt::format("Mesh sampling CDF is incorrectly formed. Final value is: {}",
mesh_CDF_.back()));
}
mesh_CDF_.back() = 1.0;
elem_idx_dist_.assign(strengths.data(), n_bins);
}
Position MeshSpatial::sample(uint64_t* seed) const
{
// Create random variable for sampling element from mesh
double eta = prn(seed);
// Sample over the CDF defined in initialization above
int32_t elem_idx = lower_bound_index(mesh_CDF_.begin(), mesh_CDF_.end(), eta);
int32_t elem_idx = elem_idx_dist_.sample(seed);
return mesh()->sample(seed, elem_idx);
}

View file

@ -353,6 +353,35 @@ Material::~Material()
model::material_map.erase(id_);
}
Material & Material::clone()
{
std::unique_ptr<Material> mat = std::make_unique<Material>();
// set all other parameters to whatever the calling Material has
mat->name_ = name_;
mat->nuclide_ = nuclide_;
mat->element_ = element_;
mat->ncrystal_mat_ = ncrystal_mat_;
mat->atom_density_ = atom_density_;
mat->density_ = density_;
mat->density_gpcc_ = density_gpcc_;
mat->volume_ = volume_;
mat->fissionable_ = fissionable_;
mat->depletable_ = depletable_;
mat->p0_ = p0_;
mat->mat_nuclide_index_ = mat_nuclide_index_;
mat->thermal_tables_ = thermal_tables_;
mat->temperature_ = temperature_;
if (ttb_)
mat->ttb_ = std::make_unique<Bremsstrahlung>(*ttb_);
mat->index_ = model::materials.size();
mat->set_id(C_NONE);
model::materials.push_back(std::move(mat));
return *model::materials.back();
}
void Material::finalize()
{
// Set fissionable if any nuclide is fissionable

View file

@ -467,7 +467,6 @@ template<class T>
void StructuredMesh::raytrace_mesh(
Position r0, Position r1, const Direction& u, T tally) const
{
// TODO: when c++-17 is available, use "if constexpr ()" to compile-time
// enable/disable tally calls for now, T template type needs to provide both
// surface and track methods, which might be empty. modern optimizing
@ -500,6 +499,12 @@ void StructuredMesh::raytrace_mesh(
return;
}
// translate start and end positions,
// this needs to come after the get_indices call because it does its own
// translation
local_coords(r0);
local_coords(r1);
// Calculate initial distances to next surfaces in all three dimensions
std::array<MeshDistance, 3> distances;
for (int k = 0; k < n; ++k) {
@ -1003,13 +1008,15 @@ void RectilinearMesh::to_hdf5(hid_t group) const
// CylindricalMesh implementation
//==============================================================================
CylindricalMesh::CylindricalMesh(pugi::xml_node node) : StructuredMesh {node}
CylindricalMesh::CylindricalMesh(pugi::xml_node node)
: PeriodicStructuredMesh {node}
{
n_dimension_ = 3;
grid_[0] = get_node_array<double>(node, "r_grid");
grid_[1] = get_node_array<double>(node, "phi_grid");
grid_[2] = get_node_array<double>(node, "z_grid");
origin_ = get_node_position(node, "origin");
if (int err = set_grid()) {
fatal_error(openmc_err_msg);
@ -1026,10 +1033,12 @@ std::string CylindricalMesh::get_mesh_type() const
StructuredMesh::MeshIndex CylindricalMesh::get_indices(
Position r, bool& in_mesh) const
{
Position mapped_r;
local_coords(r);
Position mapped_r;
mapped_r[0] = std::hypot(r.x, r.y);
mapped_r[2] = r[2];
if (mapped_r[0] < FP_PRECISION) {
mapped_r[1] = 0.0;
} else {
@ -1057,6 +1066,9 @@ double CylindricalMesh::find_r_crossing(
// s^2 * (u^2 + v^2) + 2*s*(u*x+v*y) + x^2+y^2-r0^2 = 0
const double r0 = grid_[0][shell];
if (r0 == 0.0)
return INFTY;
const double denominator = u.x * u.x + u.y * u.y;
// Direction of flight is in z-direction. Will never intersect r.
@ -1067,7 +1079,8 @@ double CylindricalMesh::find_r_crossing(
const double inv_denominator = 1.0 / denominator;
const double p = (u.x * r.x + u.y * r.y) * inv_denominator;
double D = p * p + (r0 * r0 - r.x * r.x - r.y * r.y) * inv_denominator;
double c = r.x * r.x + r.y * r.y - r0 * r0;
double D = p * p - c * inv_denominator;
if (D < 0.0)
return INFTY;
@ -1075,6 +1088,9 @@ double CylindricalMesh::find_r_crossing(
D = std::sqrt(D);
// the solution -p - D is always smaller as -p + D : Check this one first
if (std::abs(c) <= RADIAL_MESH_TOL)
return INFTY;
if (-p - D > l)
return -p - D;
if (-p + D > l)
@ -1141,22 +1157,23 @@ StructuredMesh::MeshDistance CylindricalMesh::distance_to_grid_boundary(
const MeshIndex& ijk, int i, const Position& r0, const Direction& u,
double l) const
{
Position r = r0 - origin_;
if (i == 0) {
return std::min(
MeshDistance(ijk[i] + 1, true, find_r_crossing(r0, u, l, ijk[i])),
MeshDistance(ijk[i] - 1, false, find_r_crossing(r0, u, l, ijk[i] - 1)));
MeshDistance(ijk[i] + 1, true, find_r_crossing(r, u, l, ijk[i])),
MeshDistance(ijk[i] - 1, false, find_r_crossing(r, u, l, ijk[i] - 1)));
} else if (i == 1) {
return std::min(MeshDistance(sanitize_phi(ijk[i] + 1), true,
find_phi_crossing(r0, u, l, ijk[i])),
find_phi_crossing(r, u, l, ijk[i])),
MeshDistance(sanitize_phi(ijk[i] - 1), false,
find_phi_crossing(r0, u, l, ijk[i] - 1)));
find_phi_crossing(r, u, l, ijk[i] - 1)));
} else {
return find_z_crossing(r0, u, l, ijk[i]);
return find_z_crossing(r, u, l, ijk[i]);
}
}
@ -1227,6 +1244,7 @@ void CylindricalMesh::to_hdf5(hid_t group) const
write_dataset(mesh_group, "r_grid", grid_[0]);
write_dataset(mesh_group, "phi_grid", grid_[1]);
write_dataset(mesh_group, "z_grid", grid_[2]);
write_dataset(mesh_group, "origin", origin_);
close_group(mesh_group);
}
@ -1235,13 +1253,15 @@ void CylindricalMesh::to_hdf5(hid_t group) const
// SphericalMesh implementation
//==============================================================================
SphericalMesh::SphericalMesh(pugi::xml_node node) : StructuredMesh {node}
SphericalMesh::SphericalMesh(pugi::xml_node node)
: PeriodicStructuredMesh {node}
{
n_dimension_ = 3;
grid_[0] = get_node_array<double>(node, "r_grid");
grid_[1] = get_node_array<double>(node, "theta_grid");
grid_[2] = get_node_array<double>(node, "phi_grid");
origin_ = get_node_position(node, "origin");
if (int err = set_grid()) {
fatal_error(openmc_err_msg);
@ -1258,9 +1278,11 @@ std::string SphericalMesh::get_mesh_type() const
StructuredMesh::MeshIndex SphericalMesh::get_indices(
Position r, bool& in_mesh) const
{
Position mapped_r;
local_coords(r);
Position mapped_r;
mapped_r[0] = r.norm();
if (mapped_r[0] < FP_PRECISION) {
mapped_r[1] = 0.0;
mapped_r[2] = 0.0;
@ -1288,8 +1310,14 @@ double SphericalMesh::find_r_crossing(
// solve |r+s*u| = r0
// |r+s*u| = |r| + 2*s*r*u + s^2 (|u|==1 !)
const double r0 = grid_[0][shell];
if (r0 == 0.0)
return INFTY;
const double p = r.dot(u);
double D = p * p - r.dot(r) + r0 * r0;
double c = r.dot(r) - r0 * r0;
double D = p * p - c;
if (std::abs(c) <= RADIAL_MESH_TOL)
return INFTY;
if (D >= 0.0) {
D = std::sqrt(D);
@ -1490,6 +1518,7 @@ void SphericalMesh::to_hdf5(hid_t group) const
write_dataset(mesh_group, "r_grid", grid_[0]);
write_dataset(mesh_group, "theta_grid", grid_[1]);
write_dataset(mesh_group, "phi_grid", grid_[2]);
write_dataset(mesh_group, "origin", origin_);
close_group(mesh_group);
}

View file

@ -375,6 +375,12 @@ void print_build_info()
#ifdef LIBMESH
libmesh = y;
#endif
#ifdef OPENMC_MCPL
mcpl = y;
#endif
#ifdef NCRYSTAL
ncrystal = y;
#endif
#ifdef USE_LIBPNG
png = y;
#endif
@ -404,8 +410,8 @@ void print_build_info()
fmt::print("PNG support: {}\n", png);
fmt::print("DAGMC support: {}\n", dagmc);
fmt::print("libMesh support: {}\n", libmesh);
fmt::print("NCrystal support: {}\n", profiling);
fmt::print("MCPL support: {}\n", profiling);
fmt::print("MCPL support: {}\n", mcpl);
fmt::print("NCrystal support: {}\n", ncrystal);
fmt::print("Coverage testing: {}\n", coverage);
fmt::print("Profiling flags: {}\n", profiling);
}

View file

@ -91,9 +91,13 @@ PhotonInteraction::PhotonInteraction(hid_t group)
close_group(rgroup);
// Read pair production
rgroup = open_group(group, "pair_production_electron");
read_dataset(rgroup, "xs", pair_production_electron_);
close_group(rgroup);
if (object_exists(group, "pair_production_electron")) {
rgroup = open_group(group, "pair_production_electron");
read_dataset(rgroup, "xs", pair_production_electron_);
close_group(rgroup);
} else {
pair_production_electron_ = xt::zeros_like(energy_);
}
// Read pair production
if (object_exists(group, "pair_production_nuclear")) {

View file

@ -1044,7 +1044,7 @@ double torus_distance(double x1, double x2, double x3, double u1, double u2,
// zero but possibly small and positive. A tolerance is set to discard that
// zero.
double distance = INFTY;
double cutoff = coincident ? 1e-10 : 0.0;
double cutoff = coincident ? TORUS_TOL : 0.0;
for (int i = 0; i < 4; ++i) {
if (roots[i].imag() == 0) {
double root = roots[i].real();

View file

@ -48,4 +48,11 @@ bool get_node_value_bool(pugi::xml_node node, const char* name)
return false;
}
Position get_node_position(
pugi::xml_node node, const char* name, bool lowercase)
{
vector<double> arr = get_node_array<double>(node, name, lowercase);
return Position(arr);
}
} // namespace openmc

View file

@ -1,38 +1,38 @@
<?xml version='1.0' encoding='utf-8'?>
<geometry>
<cell id="1" material="1" region="-1" universe="1" />
<cell id="2" material="2" region="1" universe="1" />
<cell fill="1" id="3" region="2 -3 4 -5 6 -8" rotation="10 20 30" universe="2" />
<cell fill="1" id="4" region="2 -3 4 -5 8 -7" translation="0 0 15" universe="2" />
<surface coeffs="1.0 0.0 0.0 5.0" id="1" type="sphere" />
<surface boundary="vacuum" coeffs="-7.5" id="2" name="minimum x" type="x-plane" />
<surface boundary="vacuum" coeffs="7.5" id="3" name="maximum x" type="x-plane" />
<surface boundary="vacuum" coeffs="-7.5" id="4" name="minimum y" type="y-plane" />
<surface boundary="vacuum" coeffs="7.5" id="5" name="maximum y" type="y-plane" />
<surface boundary="vacuum" coeffs="-7.5" id="6" type="z-plane" />
<surface boundary="vacuum" coeffs="22.5" id="7" type="z-plane" />
<surface coeffs="7.5" id="8" type="z-plane" />
</geometry>
<?xml version='1.0' encoding='utf-8'?>
<materials>
<material depletable="true" id="1">
<density units="g/cc" value="10.0" />
<nuclide ao="1.0" name="U235" />
</material>
<material id="2">
<density units="g/cc" value="0.1" />
<nuclide ao="0.1" name="H1" />
</material>
</materials>
<?xml version='1.0' encoding='utf-8'?>
<settings>
<run_mode>eigenvalue</run_mode>
<particles>10000</particles>
<batches>10</batches>
<inactive>5</inactive>
<source strength="1.0">
<space type="box">
<parameters>-4.0 -4.0 -4.0 4.0 4.0 4.0</parameters>
</space>
</source>
</settings>
<model>
<materials>
<material depletable="true" id="1">
<density units="g/cc" value="10.0" />
<nuclide ao="1.0" name="U235" />
</material>
<material id="2">
<density units="g/cc" value="0.1" />
<nuclide ao="0.1" name="H1" />
</material>
</materials>
<geometry>
<cell id="1" material="1" region="-1" universe="1" />
<cell id="2" material="2" region="1" universe="1" />
<cell fill="1" id="3" region="2 -3 4 -5 6 -8" rotation="10 20 30" universe="2" />
<cell fill="1" id="4" region="2 -3 4 -5 8 -7" translation="0 0 15" universe="2" />
<surface coeffs="1.0 0.0 0.0 5.0" id="1" type="sphere" />
<surface boundary="vacuum" coeffs="-7.5" id="2" name="minimum x" type="x-plane" />
<surface boundary="vacuum" coeffs="7.5" id="3" name="maximum x" type="x-plane" />
<surface boundary="vacuum" coeffs="-7.5" id="4" name="minimum y" type="y-plane" />
<surface boundary="vacuum" coeffs="7.5" id="5" name="maximum y" type="y-plane" />
<surface boundary="vacuum" coeffs="-7.5" id="6" type="z-plane" />
<surface boundary="vacuum" coeffs="22.5" id="7" type="z-plane" />
<surface coeffs="7.5" id="8" type="z-plane" />
</geometry>
<settings>
<run_mode>eigenvalue</run_mode>
<particles>10000</particles>
<batches>10</batches>
<inactive>5</inactive>
<source strength="1.0">
<space type="box">
<parameters>-4.0 -4.0 -4.0 4.0 4.0 4.0</parameters>
</space>
</source>
</settings>
</model>

View file

@ -1,19 +1,168 @@
<?xml version='1.0' encoding='utf-8'?>
<geometry>
<cell fill="202" id="1" region="9 -10 11 -12 13 -14" universe="0" />
<cell id="27" material="1" region="-1" universe="3" />
<cell id="28" material="2" region="1 -2" universe="3" />
<cell id="29" material="4" region="2" universe="3" />
<cell id="30" material="4" region="-3" universe="4" />
<cell id="31" material="2" region="3 -4" universe="4" />
<cell id="32" material="4" region="4" universe="4" />
<cell id="70" material="4" region="35 -36" universe="7" />
<cell fill="101" id="80" region="35 -36" universe="8" />
<lattice id="101" name="Fuel assembly (upper half)">
<pitch>1.26 1.26</pitch>
<dimension>17 17</dimension>
<lower_left>-10.71 -10.71</lower_left>
<universes>
<model>
<materials>
<material depletable="true" id="1" name="UOX fuel">
<density units="g/cm3" value="10.062" />
<nuclide ao="4.9476e-06" name="U234" />
<nuclide ao="0.00048218" name="U235" />
<nuclide ao="0.021504" name="U238" />
<nuclide ao="1.0801e-08" name="Xe135" />
<nuclide ao="0.045737" name="O16" />
</material>
<material id="2" name="Zircaloy">
<density units="g/cm3" value="5.77" />
<nuclide ao="0.5145" name="Zr90" />
<nuclide ao="0.1122" name="Zr91" />
<nuclide ao="0.1715" name="Zr92" />
<nuclide ao="0.1738" name="Zr94" />
<nuclide ao="0.028" name="Zr96" />
</material>
<material id="3" name="Cold borated water">
<density units="atom/b-cm" value="0.07416" />
<nuclide ao="2.0" name="H1" />
<nuclide ao="1.0" name="O16" />
<nuclide ao="0.000649" name="B10" />
<nuclide ao="0.002689" name="B11" />
<sab name="c_H_in_H2O" />
</material>
<material id="4" name="Hot borated water">
<density units="atom/b-cm" value="0.06614" />
<nuclide ao="2.0" name="H1" />
<nuclide ao="1.0" name="O16" />
<nuclide ao="0.000649" name="B10" />
<nuclide ao="0.002689" name="B11" />
<sab name="c_H_in_H2O" />
</material>
<material id="5" name="Reactor pressure vessel steel">
<density units="g/cm3" value="7.9" />
<nuclide name="Fe54" wo="0.05437098" />
<nuclide name="Fe56" wo="0.88500663" />
<nuclide name="Fe57" wo="0.0208008" />
<nuclide name="Fe58" wo="0.00282159" />
<nuclide name="Ni58" wo="0.0067198" />
<nuclide name="Ni60" wo="0.0026776" />
<nuclide name="Mn55" wo="0.01" />
<nuclide name="Cr52" wo="0.002092475" />
<nuclide name="C0" wo="0.0025" />
<nuclide name="Cu63" wo="0.0013696" />
</material>
<material id="6" name="Lower radial reflector">
<density units="g/cm3" value="4.32" />
<nuclide name="H1" wo="0.0095661" />
<nuclide name="O16" wo="0.0759107" />
<nuclide name="B10" wo="3.08409e-05" />
<nuclide name="B11" wo="0.000140499" />
<nuclide name="Fe54" wo="0.035620772088" />
<nuclide name="Fe56" wo="0.579805982228" />
<nuclide name="Fe57" wo="0.01362750048" />
<nuclide name="Fe58" wo="0.001848545204" />
<nuclide name="Ni58" wo="0.055298376566" />
<nuclide name="Mn55" wo="0.018287" />
<nuclide name="Cr52" wo="0.145407678031" />
<sab name="c_H_in_H2O" />
</material>
<material id="7" name="Upper radial reflector / Top plate region">
<density units="g/cm3" value="4.28" />
<nuclide name="H1" wo="0.0086117" />
<nuclide name="O16" wo="0.0683369" />
<nuclide name="B10" wo="2.77638e-05" />
<nuclide name="B11" wo="0.000126481" />
<nuclide name="Fe54" wo="0.035953677186" />
<nuclide name="Fe56" wo="0.585224740891" />
<nuclide name="Fe57" wo="0.01375486056" />
<nuclide name="Fe58" wo="0.001865821363" />
<nuclide name="Ni58" wo="0.055815129186" />
<nuclide name="Mn55" wo="0.0184579" />
<nuclide name="Cr52" wo="0.146766614995" />
<sab name="c_H_in_H2O" />
</material>
<material id="8" name="Bottom plate region">
<density units="g/cm3" value="7.184" />
<nuclide name="H1" wo="0.0011505" />
<nuclide name="O16" wo="0.0091296" />
<nuclide name="B10" wo="3.70915e-06" />
<nuclide name="B11" wo="1.68974e-05" />
<nuclide name="Fe54" wo="0.03855611055" />
<nuclide name="Fe56" wo="0.627585036425" />
<nuclide name="Fe57" wo="0.014750478" />
<nuclide name="Fe58" wo="0.002000875025" />
<nuclide name="Ni58" wo="0.059855207342" />
<nuclide name="Mn55" wo="0.019794" />
<nuclide name="Cr52" wo="0.157390026871" />
<sab name="c_H_in_H2O" />
</material>
<material id="9" name="Bottom nozzle region">
<density units="g/cm3" value="2.53" />
<nuclide name="H1" wo="0.0245014" />
<nuclide name="O16" wo="0.1944274" />
<nuclide name="B10" wo="7.89917e-05" />
<nuclide name="B11" wo="0.000359854" />
<nuclide name="Fe54" wo="0.030411411144" />
<nuclide name="Fe56" wo="0.495012237964" />
<nuclide name="Fe57" wo="0.01163454624" />
<nuclide name="Fe58" wo="0.001578204652" />
<nuclide name="Ni58" wo="0.047211231662" />
<nuclide name="Mn55" wo="0.0156126" />
<nuclide name="Cr52" wo="0.124142524198" />
<sab name="c_H_in_H2O" />
</material>
<material id="10" name="Top nozzle region">
<density units="g/cm3" value="1.746" />
<nuclide name="H1" wo="0.035887" />
<nuclide name="O16" wo="0.2847761" />
<nuclide name="B10" wo="0.000115699" />
<nuclide name="B11" wo="0.000527075" />
<nuclide name="Fe54" wo="0.02644016154" />
<nuclide name="Fe56" wo="0.43037146399" />
<nuclide name="Fe57" wo="0.0101152584" />
<nuclide name="Fe58" wo="0.00137211607" />
<nuclide name="Ni58" wo="0.04104621835" />
<nuclide name="Mn55" wo="0.0135739" />
<nuclide name="Cr52" wo="0.107931450781" />
<sab name="c_H_in_H2O" />
</material>
<material id="11" name="Top of fuel assemblies">
<density units="g/cm3" value="3.044" />
<nuclide name="H1" wo="0.0162913" />
<nuclide name="O16" wo="0.1292776" />
<nuclide name="B10" wo="5.25228e-05" />
<nuclide name="B11" wo="0.000239272" />
<nuclide name="Zr90" wo="0.43313403903" />
<nuclide name="Zr91" wo="0.09549277374" />
<nuclide name="Zr92" wo="0.14759527104" />
<nuclide name="Zr94" wo="0.15280552077" />
<nuclide name="Zr96" wo="0.02511169542" />
<sab name="c_H_in_H2O" />
</material>
<material id="12" name="Bottom of fuel assemblies">
<density units="g/cm3" value="1.762" />
<nuclide name="H1" wo="0.0292856" />
<nuclide name="O16" wo="0.2323919" />
<nuclide name="B10" wo="9.44159e-05" />
<nuclide name="B11" wo="0.00043012" />
<nuclide name="Zr90" wo="0.3741373658" />
<nuclide name="Zr91" wo="0.0824858164" />
<nuclide name="Zr92" wo="0.1274914944" />
<nuclide name="Zr94" wo="0.1319920622" />
<nuclide name="Zr96" wo="0.0216912612" />
<sab name="c_H_in_H2O" />
</material>
</materials>
<geometry>
<cell fill="202" id="1" region="9 -10 11 -12 13 -14" universe="0" />
<cell id="27" material="1" region="-1" universe="3" />
<cell id="28" material="2" region="1 -2" universe="3" />
<cell id="29" material="4" region="2" universe="3" />
<cell id="30" material="4" region="-3" universe="4" />
<cell id="31" material="2" region="3 -4" universe="4" />
<cell id="32" material="4" region="4" universe="4" />
<cell id="70" material="4" region="35 -36" universe="7" />
<cell fill="101" id="80" region="35 -36" universe="8" />
<lattice id="101" name="Fuel assembly (upper half)">
<pitch>1.26 1.26</pitch>
<dimension>17 17</dimension>
<lower_left>-10.71 -10.71</lower_left>
<universes>
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 4 3 3 4 3 3 4 3 3 3 3 3
@ -31,197 +180,47 @@
3 3 3 3 3 4 3 3 4 3 3 4 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 </universes>
</lattice>
<lattice id="202" name="3x3 Core Lattice">
<pitch>21.42 21.42</pitch>
<dimension>3 3</dimension>
<lower_left>-32.13 -32.13</lower_left>
<universes>
</lattice>
<lattice id="202" name="3x3 Core Lattice">
<pitch>21.42 21.42</pitch>
<dimension>3 3</dimension>
<lower_left>-32.13 -32.13</lower_left>
<universes>
8 7 7
8 8 8
7 7 7 </universes>
</lattice>
<surface coeffs="0.0 0.0 0.41" id="1" type="z-cylinder" />
<surface coeffs="0.0 0.0 0.475" id="2" type="z-cylinder" />
<surface coeffs="0.0 0.0 0.56" id="3" type="z-cylinder" />
<surface coeffs="0.0 0.0 0.62" id="4" type="z-cylinder" />
<surface boundary="reflective" coeffs="-32.13" id="9" type="x-plane" />
<surface boundary="reflective" coeffs="32.13" id="10" type="x-plane" />
<surface boundary="reflective" coeffs="-32.13" id="11" type="y-plane" />
<surface boundary="reflective" coeffs="32.13" id="12" type="y-plane" />
<surface boundary="reflective" coeffs="0" id="13" type="z-plane" />
<surface boundary="reflective" coeffs="32.13" id="14" type="z-plane" />
<surface coeffs="0.0" id="35" type="z-plane" />
<surface coeffs="183.0" id="36" type="z-plane" />
</geometry>
<?xml version='1.0' encoding='utf-8'?>
<materials>
<material depletable="true" id="1" name="UOX fuel">
<density units="g/cm3" value="10.062" />
<nuclide ao="4.9476e-06" name="U234" />
<nuclide ao="0.00048218" name="U235" />
<nuclide ao="0.021504" name="U238" />
<nuclide ao="1.0801e-08" name="Xe135" />
<nuclide ao="0.045737" name="O16" />
</material>
<material id="2" name="Zircaloy">
<density units="g/cm3" value="5.77" />
<nuclide ao="0.5145" name="Zr90" />
<nuclide ao="0.1122" name="Zr91" />
<nuclide ao="0.1715" name="Zr92" />
<nuclide ao="0.1738" name="Zr94" />
<nuclide ao="0.028" name="Zr96" />
</material>
<material id="3" name="Cold borated water">
<density units="atom/b-cm" value="0.07416" />
<nuclide ao="2.0" name="H1" />
<nuclide ao="1.0" name="O16" />
<nuclide ao="0.000649" name="B10" />
<nuclide ao="0.002689" name="B11" />
<sab name="c_H_in_H2O" />
</material>
<material id="4" name="Hot borated water">
<density units="atom/b-cm" value="0.06614" />
<nuclide ao="2.0" name="H1" />
<nuclide ao="1.0" name="O16" />
<nuclide ao="0.000649" name="B10" />
<nuclide ao="0.002689" name="B11" />
<sab name="c_H_in_H2O" />
</material>
<material id="5" name="Reactor pressure vessel steel">
<density units="g/cm3" value="7.9" />
<nuclide name="Fe54" wo="0.05437098" />
<nuclide name="Fe56" wo="0.88500663" />
<nuclide name="Fe57" wo="0.0208008" />
<nuclide name="Fe58" wo="0.00282159" />
<nuclide name="Ni58" wo="0.0067198" />
<nuclide name="Ni60" wo="0.0026776" />
<nuclide name="Mn55" wo="0.01" />
<nuclide name="Cr52" wo="0.002092475" />
<nuclide name="C0" wo="0.0025" />
<nuclide name="Cu63" wo="0.0013696" />
</material>
<material id="6" name="Lower radial reflector">
<density units="g/cm3" value="4.32" />
<nuclide name="H1" wo="0.0095661" />
<nuclide name="O16" wo="0.0759107" />
<nuclide name="B10" wo="3.08409e-05" />
<nuclide name="B11" wo="0.000140499" />
<nuclide name="Fe54" wo="0.035620772088" />
<nuclide name="Fe56" wo="0.579805982228" />
<nuclide name="Fe57" wo="0.01362750048" />
<nuclide name="Fe58" wo="0.001848545204" />
<nuclide name="Ni58" wo="0.055298376566" />
<nuclide name="Mn55" wo="0.018287" />
<nuclide name="Cr52" wo="0.145407678031" />
<sab name="c_H_in_H2O" />
</material>
<material id="7" name="Upper radial reflector / Top plate region">
<density units="g/cm3" value="4.28" />
<nuclide name="H1" wo="0.0086117" />
<nuclide name="O16" wo="0.0683369" />
<nuclide name="B10" wo="2.77638e-05" />
<nuclide name="B11" wo="0.000126481" />
<nuclide name="Fe54" wo="0.035953677186" />
<nuclide name="Fe56" wo="0.585224740891" />
<nuclide name="Fe57" wo="0.01375486056" />
<nuclide name="Fe58" wo="0.001865821363" />
<nuclide name="Ni58" wo="0.055815129186" />
<nuclide name="Mn55" wo="0.0184579" />
<nuclide name="Cr52" wo="0.146766614995" />
<sab name="c_H_in_H2O" />
</material>
<material id="8" name="Bottom plate region">
<density units="g/cm3" value="7.184" />
<nuclide name="H1" wo="0.0011505" />
<nuclide name="O16" wo="0.0091296" />
<nuclide name="B10" wo="3.70915e-06" />
<nuclide name="B11" wo="1.68974e-05" />
<nuclide name="Fe54" wo="0.03855611055" />
<nuclide name="Fe56" wo="0.627585036425" />
<nuclide name="Fe57" wo="0.014750478" />
<nuclide name="Fe58" wo="0.002000875025" />
<nuclide name="Ni58" wo="0.059855207342" />
<nuclide name="Mn55" wo="0.019794" />
<nuclide name="Cr52" wo="0.157390026871" />
<sab name="c_H_in_H2O" />
</material>
<material id="9" name="Bottom nozzle region">
<density units="g/cm3" value="2.53" />
<nuclide name="H1" wo="0.0245014" />
<nuclide name="O16" wo="0.1944274" />
<nuclide name="B10" wo="7.89917e-05" />
<nuclide name="B11" wo="0.000359854" />
<nuclide name="Fe54" wo="0.030411411144" />
<nuclide name="Fe56" wo="0.495012237964" />
<nuclide name="Fe57" wo="0.01163454624" />
<nuclide name="Fe58" wo="0.001578204652" />
<nuclide name="Ni58" wo="0.047211231662" />
<nuclide name="Mn55" wo="0.0156126" />
<nuclide name="Cr52" wo="0.124142524198" />
<sab name="c_H_in_H2O" />
</material>
<material id="10" name="Top nozzle region">
<density units="g/cm3" value="1.746" />
<nuclide name="H1" wo="0.035887" />
<nuclide name="O16" wo="0.2847761" />
<nuclide name="B10" wo="0.000115699" />
<nuclide name="B11" wo="0.000527075" />
<nuclide name="Fe54" wo="0.02644016154" />
<nuclide name="Fe56" wo="0.43037146399" />
<nuclide name="Fe57" wo="0.0101152584" />
<nuclide name="Fe58" wo="0.00137211607" />
<nuclide name="Ni58" wo="0.04104621835" />
<nuclide name="Mn55" wo="0.0135739" />
<nuclide name="Cr52" wo="0.107931450781" />
<sab name="c_H_in_H2O" />
</material>
<material id="11" name="Top of fuel assemblies">
<density units="g/cm3" value="3.044" />
<nuclide name="H1" wo="0.0162913" />
<nuclide name="O16" wo="0.1292776" />
<nuclide name="B10" wo="5.25228e-05" />
<nuclide name="B11" wo="0.000239272" />
<nuclide name="Zr90" wo="0.43313403903" />
<nuclide name="Zr91" wo="0.09549277374" />
<nuclide name="Zr92" wo="0.14759527104" />
<nuclide name="Zr94" wo="0.15280552077" />
<nuclide name="Zr96" wo="0.02511169542" />
<sab name="c_H_in_H2O" />
</material>
<material id="12" name="Bottom of fuel assemblies">
<density units="g/cm3" value="1.762" />
<nuclide name="H1" wo="0.0292856" />
<nuclide name="O16" wo="0.2323919" />
<nuclide name="B10" wo="9.44159e-05" />
<nuclide name="B11" wo="0.00043012" />
<nuclide name="Zr90" wo="0.3741373658" />
<nuclide name="Zr91" wo="0.0824858164" />
<nuclide name="Zr92" wo="0.1274914944" />
<nuclide name="Zr94" wo="0.1319920622" />
<nuclide name="Zr96" wo="0.0216912612" />
<sab name="c_H_in_H2O" />
</material>
</materials>
<?xml version='1.0' encoding='utf-8'?>
<settings>
<run_mode>eigenvalue</run_mode>
<particles>100</particles>
<batches>10</batches>
<inactive>5</inactive>
<source strength="1.0">
<space type="fission">
<parameters>-32 -32 0 32 32 32</parameters>
</space>
</source>
</settings>
<?xml version='1.0' encoding='utf-8'?>
<tallies>
<filter id="1" type="distribcell">
<bins>27</bins>
</filter>
<tally id="27" name="distribcell tally">
<filters>1</filters>
<scores>nu-fission</scores>
</tally>
</tallies>
</lattice>
<surface coeffs="0.0 0.0 0.41" id="1" type="z-cylinder" />
<surface coeffs="0.0 0.0 0.475" id="2" type="z-cylinder" />
<surface coeffs="0.0 0.0 0.56" id="3" type="z-cylinder" />
<surface coeffs="0.0 0.0 0.62" id="4" type="z-cylinder" />
<surface boundary="reflective" coeffs="-32.13" id="9" type="x-plane" />
<surface boundary="reflective" coeffs="32.13" id="10" type="x-plane" />
<surface boundary="reflective" coeffs="-32.13" id="11" type="y-plane" />
<surface boundary="reflective" coeffs="32.13" id="12" type="y-plane" />
<surface boundary="reflective" coeffs="0" id="13" type="z-plane" />
<surface boundary="reflective" coeffs="32.13" id="14" type="z-plane" />
<surface coeffs="0.0" id="35" type="z-plane" />
<surface coeffs="183.0" id="36" type="z-plane" />
</geometry>
<settings>
<run_mode>eigenvalue</run_mode>
<particles>100</particles>
<batches>10</batches>
<inactive>5</inactive>
<source strength="1.0">
<space type="fission">
<parameters>-32 -32 0 32 32 32</parameters>
</space>
</source>
</settings>
<tallies>
<filter id="1" type="distribcell">
<bins>27</bins>
</filter>
<tally id="27" name="distribcell tally">
<filters>1</filters>
<scores>nu-fission</scores>
</tally>
</tallies>
</model>

View file

@ -1,43 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<geometry>
<!-- Definition of Cells -->
<cell id="1">
<universe>0</universe>
<region>-1 2 -3 4 -5 6</region>
<material>1</material>
</cell>
<!-- Defition of Surfaces -->
<surface id="1">
<type>x-plane</type>
<coeffs>10</coeffs>
<boundary> vacuum </boundary>
</surface>
<surface id="2">
<type>x-plane</type>
<coeffs>-10</coeffs>
<boundary> vacuum </boundary>
</surface>
<surface id="3">
<type>y-plane</type>
<coeffs>1</coeffs>
<boundary>reflective</boundary>
</surface>
<surface id="4">
<type>y-plane</type>
<coeffs>-1</coeffs>
<boundary>reflective</boundary>
</surface>
<surface id="5">
<type>z-plane</type>
<coeffs>1</coeffs>
<boundary>reflective</boundary>
</surface>
<surface id="6">
<type>z-plane</type>
<coeffs>-1</coeffs>
<boundary>reflective</boundary>
</surface>
</geometry>

View file

@ -1,12 +0,0 @@
<?xml version="1.0"?>
<materials>
<!-- Definition of materials -->
<material id="1">
<density value="19" units="g/cc" />
<nuclide name="U235" wo="0.21" />
<nuclide name="U238" wo="0.68" />
<nuclide name="O16" wo="0.11" />
</material>
</materials>

View file

@ -0,0 +1,51 @@
<?xml version='1.0' encoding='utf-8'?>
<model>
<materials>
<material depletable="true" id="1">
<density units="g/cc" value="19.0" />
<nuclide name="U235" wo="0.21" />
<nuclide name="U238" wo="0.68" />
<nuclide name="O16" wo="0.11" />
</material>
</materials>
<geometry>
<cell id="1" material="1" region="-1 2 -3 4 -5 6" universe="0" />
<surface boundary="vacuum" coeffs="10.0" id="1" type="x-plane" />
<surface boundary="vacuum" coeffs="-10.0" id="2" type="x-plane" />
<surface boundary="reflective" coeffs="1.0" id="3" type="y-plane" />
<surface boundary="reflective" coeffs="-1.0" id="4" type="y-plane" />
<surface boundary="reflective" coeffs="1.0" id="5" type="z-plane" />
<surface boundary="reflective" coeffs="-1.0" id="6" type="z-plane" />
</geometry>
<settings>
<run_mode>eigenvalue</run_mode>
<particles>1000</particles>
<batches>20</batches>
<inactive>10</inactive>
<source strength="1.0">
<space type="box">
<parameters>-10.0 -1.0 -1.0 10.0 1.0 1.0</parameters>
</space>
</source>
<entropy_mesh>10</entropy_mesh>
<mesh id="10">
<dimension>10 1 1</dimension>
<lower_left>-10.0 -1.0 -1.0</lower_left>
<upper_right>10.0 1.0 1.0</upper_right>
</mesh>
</settings>
<tallies>
<mesh id="1">
<dimension>10 1 1</dimension>
<lower_left>-10.0 -1.0 -1.0</lower_left>
<upper_right>10.0 1.0 1.0</upper_right>
</mesh>
<filter id="1" type="mesh">
<bins>1</bins>
</filter>
<tally id="1">
<filters>1</filters>
<scores>flux</scores>
</tally>
</tallies>
</model>

View file

@ -1,26 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<settings>
<!-- Parameters for criticality calculation -->
<run_mode>eigenvalue</run_mode>
<batches>20</batches>
<inactive>10</inactive>
<particles>1000</particles>
<!-- Starting source -->
<source>
<space>
<type>box</type>
<parameters>-10 -1 -1 10 1 1</parameters>
</space>
</source>
<!-- Shannon Entropy -->
<mesh id="10">
<dimension> 10 1 1 </dimension>
<lower_left> -10.0 -1.0 -1.0 </lower_left>
<upper_right> 10.0 1.0 1.0 </upper_right>
</mesh>
<entropy_mesh>10</entropy_mesh>
</settings>

View file

@ -1,21 +0,0 @@
<?xml version="1.0"?>
<tallies>
<mesh id="1">
<type>regular</type>
<lower_left>-10 -1 -1 </lower_left>
<upper_right>10 1 1</upper_right>
<dimension>10 1 1</dimension>
</mesh>
<filter id="1">
<type>mesh</type>
<bins>1</bins>
</filter>
<tally id="1">
<filters>1</filters>
<scores>flux</scores>
</tally>
</tallies>

View file

@ -1,43 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<geometry>
<!-- Definition of Cells -->
<cell id="1">
<universe>0</universe>
<region>-1 2 -3 4 -5 6</region>
<material>1</material>
</cell>
<!-- Defition of Surfaces -->
<surface id="1">
<type>x-plane</type>
<coeffs>10</coeffs>
<boundary> vacuum </boundary>
</surface>
<surface id="2">
<type>x-plane</type>
<coeffs>-10</coeffs>
<boundary> vacuum </boundary>
</surface>
<surface id="3">
<type>y-plane</type>
<coeffs>1</coeffs>
<boundary>reflective</boundary>
</surface>
<surface id="4">
<type>y-plane</type>
<coeffs>-1</coeffs>
<boundary>reflective</boundary>
</surface>
<surface id="5">
<type>z-plane</type>
<coeffs>1</coeffs>
<boundary>reflective</boundary>
</surface>
<surface id="6">
<type>z-plane</type>
<coeffs>-1</coeffs>
<boundary>reflective</boundary>
</surface>
</geometry>

View file

@ -1,12 +0,0 @@
<?xml version="1.0"?>
<materials>
<!-- Definition of materials -->
<material id="1">
<density value="19" units="g/cc" />
<nuclide name="U235" wo="0.21" />
<nuclide name="U238" wo="0.68" />
<nuclide name="O16" wo="0.11" />
</material>
</materials>

View file

@ -0,0 +1,51 @@
<?xml version='1.0' encoding='utf-8'?>
<model>
<materials>
<material depletable="true" id="1">
<density units="g/cc" value="19.0" />
<nuclide name="U235" wo="0.21" />
<nuclide name="U238" wo="0.68" />
<nuclide name="O16" wo="0.11" />
</material>
</materials>
<geometry>
<cell id="1" material="1" region="-1 2 -3 4 -5 6" universe="0" />
<surface boundary="vacuum" coeffs="10.0" id="1" type="x-plane" />
<surface boundary="vacuum" coeffs="-10.0" id="2" type="x-plane" />
<surface boundary="reflective" coeffs="1.0" id="3" type="y-plane" />
<surface boundary="reflective" coeffs="-1.0" id="4" type="y-plane" />
<surface boundary="reflective" coeffs="1.0" id="5" type="z-plane" />
<surface boundary="reflective" coeffs="-1.0" id="6" type="z-plane" />
</geometry>
<settings>
<run_mode>eigenvalue</run_mode>
<particles>1000</particles>
<batches>20</batches>
<inactive>10</inactive>
<source strength="1.0">
<space type="box">
<parameters>-10.0 -1.0 -1.0 10.0 1.0 1.0</parameters>
</space>
</source>
<entropy_mesh>10</entropy_mesh>
<mesh id="10">
<dimension>10 1 1</dimension>
<lower_left>-10.0 -1.0 -1.0</lower_left>
<upper_right>10.0 1.0 1.0</upper_right>
</mesh>
</settings>
<tallies>
<mesh id="1">
<dimension>10 1 1</dimension>
<lower_left>-10.0 -1.0 -1.0</lower_left>
<upper_right>10.0 1.0 1.0</upper_right>
</mesh>
<filter id="1" type="mesh">
<bins>1</bins>
</filter>
<tally id="1">
<filters>1</filters>
<scores>flux</scores>
</tally>
</tallies>
</model>

View file

@ -1,26 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<settings>
<!-- Parameters for criticality calculation -->
<run_mode>eigenvalue</run_mode>
<batches>20</batches>
<inactive>10</inactive>
<particles>1000</particles>
<!-- Starting source -->
<source>
<space>
<type>box</type>
<parameters>-10 -1 -1 10 1 1</parameters>
</space>
</source>
<!-- Shannon Entropy -->
<mesh id="10">
<dimension> 10 1 1 </dimension>
<lower_left> -10.0 -1.0 -1.0 </lower_left>
<upper_right> 10.0 1.0 1.0 </upper_right>
</mesh>
<entropy_mesh>10</entropy_mesh>
</settings>

View file

@ -1,21 +0,0 @@
<?xml version="1.0"?>
<tallies>
<mesh id="1">
<type>regular</type>
<lower_left>-10 -1 -1 </lower_left>
<upper_right>10 1 1</upper_right>
<dimension>10 1 1</dimension>
</mesh>
<filter id="1">
<type>mesh</type>
<bins>1</bins>
</filter>
<tally id="1">
<filters>1</filters>
<scores>flux</scores>
</tally>
</tallies>

View file

@ -1,43 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<geometry>
<!-- Definition of Cells -->
<cell id="1">
<universe>0</universe>
<region>-1 2 -3 4 -5 6</region>
<material>1</material>
</cell>
<!-- Defition of Surfaces -->
<surface id="1">
<type>x-plane</type>
<coeffs>10</coeffs>
<boundary> vacuum </boundary>
</surface>
<surface id="2">
<type>x-plane</type>
<coeffs>-10</coeffs>
<boundary> vacuum </boundary>
</surface>
<surface id="3">
<type>y-plane</type>
<coeffs>1</coeffs>
<boundary>reflective</boundary>
</surface>
<surface id="4">
<type>y-plane</type>
<coeffs>-1</coeffs>
<boundary>reflective</boundary>
</surface>
<surface id="5">
<type>z-plane</type>
<coeffs>1</coeffs>
<boundary>reflective</boundary>
</surface>
<surface id="6">
<type>z-plane</type>
<coeffs>-1</coeffs>
<boundary>reflective</boundary>
</surface>
</geometry>

View file

@ -1,12 +0,0 @@
<?xml version="1.0"?>
<materials>
<!-- Definition of materials -->
<material id="1">
<density value="19" units="g/cc" />
<nuclide name="U235" wo="0.21" />
<nuclide name="U238" wo="0.68" />
<nuclide name="O16" wo="0.11" />
</material>
</materials>

View file

@ -0,0 +1,51 @@
<?xml version='1.0' encoding='utf-8'?>
<model>
<materials>
<material depletable="true" id="1">
<density units="g/cc" value="19.0" />
<nuclide name="U235" wo="0.21" />
<nuclide name="U238" wo="0.68" />
<nuclide name="O16" wo="0.11" />
</material>
</materials>
<geometry>
<cell id="1" material="1" region="-1 2 -3 4 -5 6" universe="0" />
<surface boundary="vacuum" coeffs="10.0" id="1" type="x-plane" />
<surface boundary="vacuum" coeffs="-10.0" id="2" type="x-plane" />
<surface boundary="reflective" coeffs="1.0" id="3" type="y-plane" />
<surface boundary="reflective" coeffs="-1.0" id="4" type="y-plane" />
<surface boundary="reflective" coeffs="1.0" id="5" type="z-plane" />
<surface boundary="reflective" coeffs="-1.0" id="6" type="z-plane" />
</geometry>
<settings>
<run_mode>eigenvalue</run_mode>
<particles>1000</particles>
<batches>20</batches>
<inactive>10</inactive>
<source strength="1.0">
<space type="box">
<parameters>-10.0 -1.0 -1.0 10.0 1.0 1.0</parameters>
</space>
</source>
<entropy_mesh>10</entropy_mesh>
<mesh id="10">
<dimension>10 1 1</dimension>
<lower_left>-10.0 -1.0 -1.0</lower_left>
<upper_right>10.0 1.0 1.0</upper_right>
</mesh>
</settings>
<tallies>
<mesh id="1">
<dimension>10 1 1</dimension>
<lower_left>-10.0 -1.0 -1.0</lower_left>
<upper_right>10.0 1.0 1.0</upper_right>
</mesh>
<filter id="1" type="mesh">
<bins>1</bins>
</filter>
<tally id="1">
<filters>1</filters>
<scores>flux</scores>
</tally>
</tallies>
</model>

View file

@ -1,26 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<settings>
<!-- Parameters for criticality calculation -->
<run_mode>eigenvalue</run_mode>
<batches>20</batches>
<inactive>10</inactive>
<particles>1000</particles>
<!-- Starting source -->
<source>
<space>
<type>box</type>
<parameters>-10 -1 -1 10 1 1</parameters>
</space>
</source>
<!-- Shannon Entropy -->
<mesh id="10">
<dimension> 10 1 1 </dimension>
<lower_left> -10.0 -1.0 -1.0 </lower_left>
<upper_right> 10.0 1.0 1.0 </upper_right>
</mesh>
<entropy_mesh>10</entropy_mesh>
</settings>

View file

@ -1,21 +0,0 @@
<?xml version="1.0"?>
<tallies>
<mesh id="1">
<type>regular</type>
<lower_left>-10 -1 -1 </lower_left>
<upper_right>10 1 1</upper_right>
<dimension>10 1 1</dimension>
</mesh>
<filter id="1">
<type>mesh</type>
<bins>1</bins>
</filter>
<tally id="1">
<filters>1</filters>
<scores>flux</scores>
</tally>
</tallies>

View file

@ -1,43 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<geometry>
<!-- Definition of Cells -->
<cell id="1">
<universe>0</universe>
<region>-1 2 -3 4 -5 6</region>
<material>1</material>
</cell>
<!-- Defition of Surfaces -->
<surface id="1">
<type>x-plane</type>
<coeffs>10</coeffs>
<boundary> vacuum </boundary>
</surface>
<surface id="2">
<type>x-plane</type>
<coeffs>-10</coeffs>
<boundary> vacuum </boundary>
</surface>
<surface id="3">
<type>y-plane</type>
<coeffs>1</coeffs>
<boundary>reflective</boundary>
</surface>
<surface id="4">
<type>y-plane</type>
<coeffs>-1</coeffs>
<boundary>reflective</boundary>
</surface>
<surface id="5">
<type>z-plane</type>
<coeffs>1</coeffs>
<boundary>reflective</boundary>
</surface>
<surface id="6">
<type>z-plane</type>
<coeffs>-1</coeffs>
<boundary>reflective</boundary>
</surface>
</geometry>

View file

@ -1,12 +0,0 @@
<?xml version="1.0"?>
<materials>
<!-- Definition of materials -->
<material id="1">
<density value="19" units="g/cc" />
<nuclide name="U235" wo="0.21" />
<nuclide name="U238" wo="0.68" />
<nuclide name="O16" wo="0.11" />
</material>
</materials>

View file

@ -0,0 +1,51 @@
<?xml version='1.0' encoding='utf-8'?>
<model>
<materials>
<material depletable="true" id="1">
<density units="g/cc" value="19.0" />
<nuclide name="U235" wo="0.21" />
<nuclide name="U238" wo="0.68" />
<nuclide name="O16" wo="0.11" />
</material>
</materials>
<geometry>
<cell id="1" material="1" region="-1 2 -3 4 -5 6" universe="0" />
<surface boundary="vacuum" coeffs="10.0" id="1" type="x-plane" />
<surface boundary="vacuum" coeffs="-10.0" id="2" type="x-plane" />
<surface boundary="reflective" coeffs="1.0" id="3" type="y-plane" />
<surface boundary="reflective" coeffs="-1.0" id="4" type="y-plane" />
<surface boundary="reflective" coeffs="1.0" id="5" type="z-plane" />
<surface boundary="reflective" coeffs="-1.0" id="6" type="z-plane" />
</geometry>
<settings>
<run_mode>eigenvalue</run_mode>
<particles>1000</particles>
<batches>20</batches>
<inactive>10</inactive>
<source strength="1.0">
<space type="box">
<parameters>-10.0 -1.0 -1.0 10.0 1.0 1.0</parameters>
</space>
</source>
<entropy_mesh>10</entropy_mesh>
<mesh id="10">
<dimension>10 1 1</dimension>
<lower_left>-10.0 -1.0 -1.0</lower_left>
<upper_right>10.0 1.0 1.0</upper_right>
</mesh>
</settings>
<tallies>
<mesh id="1">
<dimension>10 1 1</dimension>
<lower_left>-10.0 -1.0 -1.0</lower_left>
<upper_right>10.0 1.0 1.0</upper_right>
</mesh>
<filter id="1" type="mesh">
<bins>1</bins>
</filter>
<tally id="1">
<filters>1</filters>
<scores>flux</scores>
</tally>
</tallies>
</model>

View file

@ -1,26 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<settings>
<!-- Parameters for criticality calculation -->
<run_mode>eigenvalue</run_mode>
<batches>20</batches>
<inactive>10</inactive>
<particles>1000</particles>
<!-- Starting source -->
<source>
<space>
<type>box</type>
<parameters>-10 -1 -1 10 1 1</parameters>
</space>
</source>
<!-- Shannon Entropy -->
<mesh id="10">
<dimension> 10 1 1 </dimension>
<lower_left> -10.0 -1.0 -1.0 </lower_left>
<upper_right> 10.0 1.0 1.0 </upper_right>
</mesh>
<entropy_mesh>10</entropy_mesh>
</settings>

View file

@ -1,21 +0,0 @@
<?xml version="1.0"?>
<tallies>
<mesh id="1">
<type>regular</type>
<lower_left>-10 -1 -1 </lower_left>
<upper_right>10 1 1</upper_right>
<dimension>10 1 1</dimension>
</mesh>
<filter id="1">
<type>mesh</type>
<bins>1</bins>
</filter>
<tally id="1">
<filters>1</filters>
<scores>flux</scores>
</tally>
</tallies>

View file

@ -1,43 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<geometry>
<!-- Definition of Cells -->
<cell id="1">
<universe>0</universe>
<region>-1 2 -3 4 -5 6</region>
<material>1</material>
</cell>
<!-- Defition of Surfaces -->
<surface id="1">
<type>x-plane</type>
<coeffs>10</coeffs>
<boundary> vacuum </boundary>
</surface>
<surface id="2">
<type>x-plane</type>
<coeffs>-10</coeffs>
<boundary> vacuum </boundary>
</surface>
<surface id="3">
<type>y-plane</type>
<coeffs>1</coeffs>
<boundary>reflective</boundary>
</surface>
<surface id="4">
<type>y-plane</type>
<coeffs>-1</coeffs>
<boundary>reflective</boundary>
</surface>
<surface id="5">
<type>z-plane</type>
<coeffs>1</coeffs>
<boundary>reflective</boundary>
</surface>
<surface id="6">
<type>z-plane</type>
<coeffs>-1</coeffs>
<boundary>reflective</boundary>
</surface>
</geometry>

View file

@ -1,12 +0,0 @@
<?xml version="1.0"?>
<materials>
<!-- Definition of materials -->
<material id="1">
<density value="19" units="g/cc" />
<nuclide name="U235" wo="0.21" />
<nuclide name="U238" wo="0.68" />
<nuclide name="O16" wo="0.11" />
</material>
</materials>

View file

@ -0,0 +1,51 @@
<?xml version='1.0' encoding='utf-8'?>
<model>
<materials>
<material depletable="true" id="1">
<density units="g/cc" value="19.0" />
<nuclide name="U235" wo="0.21" />
<nuclide name="U238" wo="0.68" />
<nuclide name="O16" wo="0.11" />
</material>
</materials>
<geometry>
<cell id="1" material="1" region="-1 2 -3 4 -5 6" universe="0" />
<surface boundary="vacuum" coeffs="10.0" id="1" type="x-plane" />
<surface boundary="vacuum" coeffs="-10.0" id="2" type="x-plane" />
<surface boundary="reflective" coeffs="1.0" id="3" type="y-plane" />
<surface boundary="reflective" coeffs="-1.0" id="4" type="y-plane" />
<surface boundary="reflective" coeffs="1.0" id="5" type="z-plane" />
<surface boundary="reflective" coeffs="-1.0" id="6" type="z-plane" />
</geometry>
<settings>
<run_mode>eigenvalue</run_mode>
<particles>1000</particles>
<batches>20</batches>
<inactive>10</inactive>
<source strength="1.0">
<space type="box">
<parameters>-10.0 -1.0 -1.0 10.0 1.0 1.0</parameters>
</space>
</source>
<entropy_mesh>10</entropy_mesh>
<mesh id="10">
<dimension>10 1 1</dimension>
<lower_left>-10.0 -1.0 -1.0</lower_left>
<upper_right>10.0 1.0 1.0</upper_right>
</mesh>
</settings>
<tallies>
<mesh id="1">
<dimension>10 1 1</dimension>
<lower_left>-10.0 -1.0 -1.0</lower_left>
<upper_right>10.0 1.0 1.0</upper_right>
</mesh>
<filter id="1" type="mesh">
<bins>1</bins>
</filter>
<tally id="1">
<filters>1</filters>
<scores>flux</scores>
</tally>
</tallies>
</model>

View file

@ -1,26 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<settings>
<!-- Parameters for criticality calculation -->
<run_mode>eigenvalue</run_mode>
<batches>20</batches>
<inactive>10</inactive>
<particles>1000</particles>
<!-- Starting source -->
<source>
<space>
<type>box</type>
<parameters>-10 -1 -1 10 1 1</parameters>
</space>
</source>
<!-- Shannon Entropy -->
<mesh id="10">
<dimension> 10 1 1 </dimension>
<lower_left> -10.0 -1.0 -1.0 </lower_left>
<upper_right> 10.0 1.0 1.0 </upper_right>
</mesh>
<entropy_mesh>10</entropy_mesh>
</settings>

View file

@ -1,21 +0,0 @@
<?xml version="1.0"?>
<tallies>
<mesh id="1">
<type>regular</type>
<lower_left>-10 -1 -1 </lower_left>
<upper_right>10 1 1</upper_right>
<dimension>10 1 1</dimension>
</mesh>
<filter id="1">
<type>mesh</type>
<bins>1</bins>
</filter>
<tally id="1">
<filters>1</filters>
<scores>flux</scores>
</tally>
</tallies>

View file

@ -1,43 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<geometry>
<!-- Definition of Cells -->
<cell id="1">
<universe>0</universe>
<region>-1 2 -3 4 -5 6</region>
<material>1</material>
</cell>
<!-- Defition of Surfaces -->
<surface id="1">
<type>x-plane</type>
<coeffs>10</coeffs>
<boundary> vacuum </boundary>
</surface>
<surface id="2">
<type>x-plane</type>
<coeffs>-10</coeffs>
<boundary> vacuum </boundary>
</surface>
<surface id="3">
<type>y-plane</type>
<coeffs>1</coeffs>
<boundary>reflective</boundary>
</surface>
<surface id="4">
<type>y-plane</type>
<coeffs>-1</coeffs>
<boundary>reflective</boundary>
</surface>
<surface id="5">
<type>z-plane</type>
<coeffs>1</coeffs>
<boundary>reflective</boundary>
</surface>
<surface id="6">
<type>z-plane</type>
<coeffs>-1</coeffs>
<boundary>reflective</boundary>
</surface>
</geometry>

View file

@ -1,12 +0,0 @@
<?xml version="1.0"?>
<materials>
<!-- Definition of materials -->
<material id="1">
<density value="19" units="g/cc" />
<nuclide name="U235" wo="0.21" />
<nuclide name="U238" wo="0.68" />
<nuclide name="O16" wo="0.11" />
</material>
</materials>

View file

@ -0,0 +1,51 @@
<?xml version='1.0' encoding='utf-8'?>
<model>
<materials>
<material depletable="true" id="1">
<density units="g/cc" value="19.0" />
<nuclide name="U235" wo="0.21" />
<nuclide name="U238" wo="0.68" />
<nuclide name="O16" wo="0.11" />
</material>
</materials>
<geometry>
<cell id="1" material="1" region="-1 2 -3 4 -5 6" universe="0" />
<surface boundary="vacuum" coeffs="10.0" id="1" type="x-plane" />
<surface boundary="vacuum" coeffs="-10.0" id="2" type="x-plane" />
<surface boundary="reflective" coeffs="1.0" id="3" type="y-plane" />
<surface boundary="reflective" coeffs="-1.0" id="4" type="y-plane" />
<surface boundary="reflective" coeffs="1.0" id="5" type="z-plane" />
<surface boundary="reflective" coeffs="-1.0" id="6" type="z-plane" />
</geometry>
<settings>
<run_mode>eigenvalue</run_mode>
<particles>1000</particles>
<batches>20</batches>
<inactive>10</inactive>
<source strength="1.0">
<space type="box">
<parameters>-10.0 -1.0 -1.0 10.0 1.0 1.0</parameters>
</space>
</source>
<entropy_mesh>10</entropy_mesh>
<mesh id="10">
<dimension>10 1 1</dimension>
<lower_left>-10.0 -1.0 -1.0</lower_left>
<upper_right>10.0 1.0 1.0</upper_right>
</mesh>
</settings>
<tallies>
<mesh id="1">
<dimension>10 1 1</dimension>
<lower_left>-10.0 -1.0 -1.0</lower_left>
<upper_right>10.0 1.0 1.0</upper_right>
</mesh>
<filter id="1" type="mesh">
<bins>1</bins>
</filter>
<tally id="1">
<filters>1</filters>
<scores>flux</scores>
</tally>
</tallies>
</model>

View file

@ -1,26 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<settings>
<!-- Parameters for criticality calculation -->
<run_mode>eigenvalue</run_mode>
<batches>20</batches>
<inactive>10</inactive>
<particles>1000</particles>
<!-- Starting source -->
<source>
<space>
<type>box</type>
<parameters>-10 -1 -1 10 1 1</parameters>
</space>
</source>
<!-- Shannon Entropy -->
<mesh id="10">
<dimension> 10 1 1 </dimension>
<lower_left> -10.0 -1.0 -1.0 </lower_left>
<upper_right> 10.0 1.0 1.0 </upper_right>
</mesh>
<entropy_mesh>10</entropy_mesh>
</settings>

View file

@ -1,21 +0,0 @@
<?xml version="1.0"?>
<tallies>
<mesh id="1">
<type>regular</type>
<lower_left>-10 -1 -1 </lower_left>
<upper_right>10 1 1</upper_right>
<dimension>10 1 1</dimension>
</mesh>
<filter id="1">
<type>mesh</type>
<bins>1</bins>
</filter>
<tally id="1">
<filters>1</filters>
<scores>flux</scores>
</tally>
</tallies>

View file

@ -1,43 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<geometry>
<!-- Definition of Cells -->
<cell id="1">
<universe>0</universe>
<region>-1 2 -3 4 -5 6</region>
<material>1</material>
</cell>
<!-- Defition of Surfaces -->
<surface id="1">
<type>x-plane</type>
<coeffs>10</coeffs>
<boundary> vacuum </boundary>
</surface>
<surface id="2">
<type>x-plane</type>
<coeffs>-10</coeffs>
<boundary> vacuum </boundary>
</surface>
<surface id="3">
<type>y-plane</type>
<coeffs>1</coeffs>
<boundary>reflective</boundary>
</surface>
<surface id="4">
<type>y-plane</type>
<coeffs>-1</coeffs>
<boundary>reflective</boundary>
</surface>
<surface id="5">
<type>z-plane</type>
<coeffs>1</coeffs>
<boundary>reflective</boundary>
</surface>
<surface id="6">
<type>z-plane</type>
<coeffs>-1</coeffs>
<boundary>reflective</boundary>
</surface>
</geometry>

View file

@ -1,12 +0,0 @@
<?xml version="1.0"?>
<materials>
<!-- Definition of materials -->
<material id="1">
<density value="19" units="g/cc" />
<nuclide name="U235" wo="0.21" />
<nuclide name="U238" wo="0.68" />
<nuclide name="O16" wo="0.11" />
</material>
</materials>

View file

@ -0,0 +1,54 @@
<?xml version='1.0' encoding='utf-8'?>
<model>
<materials>
<material depletable="true" id="1">
<density units="g/cc" value="19.0" />
<nuclide name="U235" wo="0.21" />
<nuclide name="U238" wo="0.68" />
<nuclide name="O16" wo="0.11" />
</material>
</materials>
<geometry>
<cell id="1" material="1" region="-1 2 -3 4 -5 6" universe="0" />
<surface boundary="vacuum" coeffs="10.0" id="1" type="x-plane" />
<surface boundary="vacuum" coeffs="-10.0" id="2" type="x-plane" />
<surface boundary="reflective" coeffs="1.0" id="3" type="y-plane" />
<surface boundary="reflective" coeffs="-1.0" id="4" type="y-plane" />
<surface boundary="reflective" coeffs="1.0" id="5" type="z-plane" />
<surface boundary="reflective" coeffs="-1.0" id="6" type="z-plane" />
</geometry>
<settings>
<run_mode>eigenvalue</run_mode>
<particles>1000</particles>
<batches>20</batches>
<inactive>10</inactive>
<source strength="1.0">
<space type="box">
<parameters>-10.0 -1.0 -1.0 10.0 1.0 1.0</parameters>
</space>
</source>
<state_point>
<batches>15 20</batches>
</state_point>
<entropy_mesh>10</entropy_mesh>
<mesh id="10">
<dimension>10 1 1</dimension>
<lower_left>-10.0 -1.0 -1.0</lower_left>
<upper_right>10.0 1.0 1.0</upper_right>
</mesh>
</settings>
<tallies>
<mesh id="1">
<dimension>10 1 1</dimension>
<lower_left>-10.0 -1.0 -1.0</lower_left>
<upper_right>10.0 1.0 1.0</upper_right>
</mesh>
<filter id="1" type="mesh">
<bins>1</bins>
</filter>
<tally id="1">
<filters>1</filters>
<scores>flux</scores>
</tally>
</tallies>
</model>

View file

@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<settings>
<!-- Parameters for criticality calculation -->
<run_mode>eigenvalue</run_mode>
<batches>20</batches>
<inactive>10</inactive>
<particles>1000</particles>
<!-- Starting source -->
<source>
<space>
<type>box</type>
<parameters>-10 -1 -1 10 1 1</parameters>
</space>
</source>
<!-- Shannon Entropy -->
<mesh id="10">
<dimension> 10 1 1 </dimension>
<lower_left> -10.0 -1.0 -1.0 </lower_left>
<upper_right> 10.0 1.0 1.0 </upper_right>
</mesh>
<entropy_mesh>10</entropy_mesh>
<state_point batches="15 20" />
</settings>

View file

@ -1,21 +0,0 @@
<?xml version="1.0"?>
<tallies>
<mesh id="1">
<type>regular</type>
<lower_left>-10 -1 -1 </lower_left>
<upper_right>10 1 1</upper_right>
<dimension>10 1 1</dimension>
</mesh>
<filter id="1">
<type>mesh</type>
<bins>1</bins>
</filter>
<tally id="1">
<filters>1</filters>
<scores>flux</scores>
</tally>
</tallies>

View file

@ -1,45 +1,45 @@
<?xml version='1.0' encoding='utf-8'?>
<geometry>
<cell id="1" material="1" region="-1" universe="1" />
<cell id="2" material="2" region="1 -2" universe="1" />
<cell id="3" material="3" region="2" universe="1" />
<cell fill="1" id="4" universe="2" />
<cell fill="3" id="5" region="3 -4 5 -6" universe="4" />
<lattice id="3">
<pitch>4.0 4.0</pitch>
<dimension>2 2</dimension>
<lower_left>-4.0 -4.0</lower_left>
<universes>
<model>
<materials>
<material depletable="true" id="1" name="fuel">
<density units="g/cc" value="11" />
<nuclide ao="1.0" name="U235" />
</material>
<material id="2" name="cladding">
<density units="g/cc" value="6.44" />
<nuclide ao="1.0" name="Zr90" />
</material>
<material id="3" name="water">
<density units="g/cc" value="1.0" />
<nuclide ao="2.0" name="H1" />
<nuclide ao="1.0" name="O16" />
</material>
</materials>
<geometry>
<cell id="1" material="1" region="-1" universe="1" />
<cell id="2" material="2" region="1 -2" universe="1" />
<cell id="3" material="3" region="2" universe="1" />
<cell fill="1" id="4" universe="2" />
<cell fill="3" id="5" region="3 -4 5 -6" universe="4" />
<lattice id="3">
<pitch>4.0 4.0</pitch>
<dimension>2 2</dimension>
<lower_left>-4.0 -4.0</lower_left>
<universes>
2 2
2 2 </universes>
</lattice>
<surface coeffs="0.0 0.0 1.5" id="1" type="z-cylinder" />
<surface coeffs="0.0 0.0 1.7" id="2" type="z-cylinder" />
<surface boundary="reflective" coeffs="-4.0" id="3" name="minimum x" type="x-plane" />
<surface boundary="reflective" coeffs="4.0" id="4" name="maximum x" type="x-plane" />
<surface boundary="reflective" coeffs="-4.0" id="5" name="minimum y" type="y-plane" />
<surface boundary="reflective" coeffs="4.0" id="6" name="maximum y" type="y-plane" />
</geometry>
<?xml version='1.0' encoding='utf-8'?>
<materials>
<material depletable="true" id="1" name="fuel">
<density units="g/cc" value="11" />
<nuclide ao="1.0" name="U235" />
</material>
<material id="2" name="cladding">
<density units="g/cc" value="6.44" />
<nuclide ao="1.0" name="Zr90" />
</material>
<material id="3" name="water">
<density units="g/cc" value="1.0" />
<nuclide ao="2.0" name="H1" />
<nuclide ao="1.0" name="O16" />
</material>
</materials>
<?xml version='1.0' encoding='utf-8'?>
<settings>
<run_mode>eigenvalue</run_mode>
<particles>100</particles>
<batches>10</batches>
<inactive>1</inactive>
</settings>
</lattice>
<surface coeffs="0.0 0.0 1.5" id="1" type="z-cylinder" />
<surface coeffs="0.0 0.0 1.7" id="2" type="z-cylinder" />
<surface boundary="reflective" coeffs="-4.0" id="3" name="minimum x" type="x-plane" />
<surface boundary="reflective" coeffs="4.0" id="4" name="maximum x" type="x-plane" />
<surface boundary="reflective" coeffs="-4.0" id="5" name="minimum y" type="y-plane" />
<surface boundary="reflective" coeffs="4.0" id="6" name="maximum y" type="y-plane" />
</geometry>
<settings>
<run_mode>eigenvalue</run_mode>
<particles>100</particles>
<batches>10</batches>
<inactive>1</inactive>
</settings>
</model>

View file

@ -1,37 +1,36 @@
<?xml version='1.0' encoding='utf-8'?>
<geometry>
<cell id="1" material="1" name="box" region="1 -2 3 -4 5 -6" universe="0" />
<surface boundary="reflective" coeffs="-1" id="1" type="x-plane" />
<surface boundary="reflective" coeffs="1" id="2" type="x-plane" />
<surface boundary="reflective" coeffs="-1" id="3" type="y-plane" />
<surface boundary="reflective" coeffs="1" id="4" type="y-plane" />
<surface boundary="reflective" coeffs="-1" id="5" type="z-plane" />
<surface boundary="reflective" coeffs="1" id="6" type="z-plane" />
</geometry>
<?xml version='1.0' encoding='utf-8'?>
<materials>
<material depletable="true" id="1" name="mat">
<density units="atom/b-cm" value="0.069335" />
<nuclide ao="40.0" name="H1" />
<nuclide ao="1.0" name="U235" />
</material>
</materials>
<?xml version='1.0' encoding='utf-8'?>
<settings>
<run_mode>fixed source</run_mode>
<particles>100</particles>
<batches>10</batches>
<source strength="1.0">
<space type="box">
<parameters>-1 -1 -1 1 1 1</parameters>
</space>
<energy parameters="988000.0 2.249e-06" type="watt" />
</source>
<create_fission_neutrons>false</create_fission_neutrons>
</settings>
<?xml version='1.0' encoding='utf-8'?>
<tallies>
<tally id="1">
<scores>flux</scores>
</tally>
</tallies>
<model>
<materials>
<material depletable="true" id="1" name="mat">
<density units="atom/b-cm" value="0.069335" />
<nuclide ao="40.0" name="H1" />
<nuclide ao="1.0" name="U235" />
</material>
</materials>
<geometry>
<cell id="1" material="1" name="box" region="1 -2 3 -4 5 -6" universe="0" />
<surface boundary="reflective" coeffs="-1" id="1" type="x-plane" />
<surface boundary="reflective" coeffs="1" id="2" type="x-plane" />
<surface boundary="reflective" coeffs="-1" id="3" type="y-plane" />
<surface boundary="reflective" coeffs="1" id="4" type="y-plane" />
<surface boundary="reflective" coeffs="-1" id="5" type="z-plane" />
<surface boundary="reflective" coeffs="1" id="6" type="z-plane" />
</geometry>
<settings>
<run_mode>fixed source</run_mode>
<particles>100</particles>
<batches>10</batches>
<source strength="1.0">
<space type="box">
<parameters>-1 -1 -1 1 1 1</parameters>
</space>
<energy parameters="988000.0 2.249e-06" type="watt" />
</source>
<create_fission_neutrons>false</create_fission_neutrons>
</settings>
<tallies>
<tally id="1">
<scores>flux</scores>
</tally>
</tallies>
</model>

View file

@ -4,14 +4,14 @@ from tests.testing_harness import PyAPITestHarness
class CreateFissionNeutronsTestHarness(PyAPITestHarness):
def _build_inputs(self):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
# Material is composed of H-1 and U-235
mat = openmc.Material(material_id=1, name='mat')
mat.set_density('atom/b-cm', 0.069335)
mat.add_nuclide('H1', 40.0)
mat.add_nuclide('U235', 1.0)
materials_file = openmc.Materials([mat])
materials_file.export_to_xml()
self._model.materials = openmc.Materials([mat])
# Cell is box with reflective boundary
x1 = openmc.XPlane(surface_id=1, x0=-1)
@ -27,8 +27,7 @@ class CreateFissionNeutronsTestHarness(PyAPITestHarness):
box.fill = mat
root = openmc.Universe(universe_id=0, name='root universe')
root.add_cell(box)
geometry = openmc.Geometry(root)
geometry.export_to_xml()
self._model.geometry = openmc.Geometry(root)
# Set the running parameters
settings_file = openmc.Settings()
@ -41,14 +40,14 @@ class CreateFissionNeutronsTestHarness(PyAPITestHarness):
watt_dist = openmc.stats.Watt()
settings_file.source = openmc.source.Source(space=uniform_dist,
energy=watt_dist)
settings_file.export_to_xml()
self._model.settings = settings_file
# Create tallies
tallies = openmc.Tallies()
tally = openmc.Tally(1)
tally.scores = ['flux']
tallies.append(tally)
tallies.export_to_xml()
self._model.tallies = tallies
def _get_results(self):
"""Digest info in the statepoint and return as a string."""
@ -66,5 +65,6 @@ class CreateFissionNeutronsTestHarness(PyAPITestHarness):
def test_create_fission_neutrons():
harness = CreateFissionNeutronsTestHarness('statepoint.10.h5')
harness = CreateFissionNeutronsTestHarness('statepoint.10.h5',
model=openmc.Model())
harness.main()

View file

@ -1,40 +1,39 @@
<?xml version='1.0' encoding='utf-8'?>
<geometry>
<dagmc_universe filename="dagmc.h5m" id="1" />
</geometry>
<?xml version='1.0' encoding='utf-8'?>
<materials>
<material depletable="true" id="40" name="no-void fuel">
<density units="g/cc" value="11" />
<nuclide ao="1.0" name="U235" />
</material>
<material id="41" name="water">
<density units="g/cc" value="1.0" />
<nuclide ao="2.0" name="H1" />
<nuclide ao="1.0" name="O16" />
<sab name="c_H_in_H2O" />
</material>
</materials>
<?xml version='1.0' encoding='utf-8'?>
<settings>
<run_mode>eigenvalue</run_mode>
<particles>100</particles>
<batches>5</batches>
<inactive>0</inactive>
<source strength="1.0">
<space type="box">
<parameters>-4 -4 -4 4 4 4</parameters>
</space>
</source>
<temperature_default>293</temperature_default>
</settings>
<?xml version='1.0' encoding='utf-8'?>
<tallies>
<filter id="1" type="cell">
<bins>1</bins>
</filter>
<tally id="1">
<filters>1</filters>
<scores>total</scores>
</tally>
</tallies>
<model>
<materials>
<material depletable="true" id="40" name="no-void fuel">
<density units="g/cc" value="11" />
<nuclide ao="1.0" name="U235" />
</material>
<material id="41" name="water">
<density units="g/cc" value="1.0" />
<nuclide ao="2.0" name="H1" />
<nuclide ao="1.0" name="O16" />
<sab name="c_H_in_H2O" />
</material>
</materials>
<geometry>
<dagmc_universe filename="dagmc.h5m" id="1" />
</geometry>
<settings>
<run_mode>eigenvalue</run_mode>
<particles>100</particles>
<batches>5</batches>
<inactive>0</inactive>
<source strength="1.0">
<space type="box">
<parameters>-4 -4 -4 4 4 4</parameters>
</space>
</source>
<temperature_default>293</temperature_default>
</settings>
<tallies>
<filter id="1" type="cell">
<bins>1</bins>
</filter>
<tally id="1">
<filters>1</filters>
<scores>total</scores>
</tally>
</tallies>
</model>

View file

@ -1,39 +1,38 @@
<?xml version='1.0' encoding='utf-8'?>
<geometry>
<dagmc_universe filename="dagmc.h5m" id="1" />
</geometry>
<?xml version='1.0' encoding='utf-8'?>
<materials>
<material depletable="true" id="40" name="no-void fuel">
<density units="g/cc" value="11" />
<nuclide ao="1.0" name="U235" />
</material>
<material id="41" name="water">
<density units="g/cc" value="1.0" />
<nuclide ao="2.0" name="H1" />
<nuclide ao="1.0" name="O16" />
<sab name="c_H_in_H2O" />
</material>
</materials>
<?xml version='1.0' encoding='utf-8'?>
<settings>
<run_mode>eigenvalue</run_mode>
<particles>100</particles>
<batches>5</batches>
<inactive>0</inactive>
<source strength="1.0">
<space type="box">
<parameters>-4 -4 -4 4 4 4</parameters>
</space>
</source>
</settings>
<?xml version='1.0' encoding='utf-8'?>
<tallies>
<filter id="1" type="cell">
<bins>1</bins>
</filter>
<tally id="1">
<filters>1</filters>
<scores>total</scores>
</tally>
</tallies>
<model>
<materials>
<material depletable="true" id="40" name="no-void fuel">
<density units="g/cc" value="11" />
<nuclide ao="1.0" name="U235" />
</material>
<material id="41" name="water">
<density units="g/cc" value="1.0" />
<nuclide ao="2.0" name="H1" />
<nuclide ao="1.0" name="O16" />
<sab name="c_H_in_H2O" />
</material>
</materials>
<geometry>
<dagmc_universe filename="dagmc.h5m" id="1" />
</geometry>
<settings>
<run_mode>eigenvalue</run_mode>
<particles>100</particles>
<batches>5</batches>
<inactive>0</inactive>
<source strength="1.0">
<space type="box">
<parameters>-4 -4 -4 4 4 4</parameters>
</space>
</source>
</settings>
<tallies>
<filter id="1" type="cell">
<bins>1</bins>
</filter>
<tally id="1">
<filters>1</filters>
<scores>total</scores>
</tally>
</tallies>
</model>

View file

@ -1,29 +1,28 @@
<?xml version='1.0' encoding='utf-8'?>
<geometry>
<dagmc_universe auto_geom_ids="true" filename="dagmc.h5m" id="9" />
</geometry>
<?xml version='1.0' encoding='utf-8'?>
<materials>
</materials>
<?xml version='1.0' encoding='utf-8'?>
<settings>
<run_mode>eigenvalue</run_mode>
<particles>100</particles>
<batches>5</batches>
<inactive>0</inactive>
<source strength="1.0">
<space type="box">
<parameters>-4 -4 -4 4 4 4</parameters>
</space>
</source>
</settings>
<?xml version='1.0' encoding='utf-8'?>
<tallies>
<filter id="1" type="cell">
<bins>2</bins>
</filter>
<tally id="1">
<filters>1</filters>
<scores>total</scores>
</tally>
</tallies>
<model>
<materials>
</materials>
<geometry>
<dagmc_universe auto_geom_ids="true" filename="dagmc.h5m" id="1" />
</geometry>
<settings>
<run_mode>eigenvalue</run_mode>
<particles>100</particles>
<batches>5</batches>
<inactive>0</inactive>
<source strength="1.0">
<space type="box">
<parameters>-4 -4 -4 4 4 4</parameters>
</space>
</source>
</settings>
<tallies>
<filter id="1" type="cell">
<bins>2</bins>
</filter>
<tally id="1">
<filters>1</filters>
<scores>total</scores>
</tally>
</tallies>
</model>

View file

@ -10,34 +10,29 @@ pytestmark = pytest.mark.skipif(
reason="DAGMC CAD geometry is not enabled.")
class UWUWTest(PyAPITestHarness):
def _build_inputs(self):
model = openmc.model.Model()
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
# settings
model.settings.batches = 5
model.settings.inactive = 0
model.settings.particles = 100
self._model.settings.batches = 5
self._model.settings.inactive = 0
self._model.settings.particles = 100
source = openmc.Source(space=Box([-4, -4, -4],
[ 4, 4, 4]))
model.settings.source = source
model.settings.export_to_xml()
self._model.settings.source = source
# geometry
dag_univ = openmc.DAGMCUniverse("dagmc.h5m", auto_geom_ids=True)
model.geometry = openmc.Geometry(dag_univ)
self._model.geometry = openmc.Geometry(dag_univ)
# tally
tally = openmc.Tally()
tally.scores = ['total']
tally.filters = [openmc.CellFilter(2)]
model.tallies = [tally]
self._model.tallies = [tally]
model.tallies.export_to_xml()
model.export_to_xml()
def test_refl():
harness = UWUWTest('statepoint.5.h5')
harness = UWUWTest('statepoint.5.h5', model=openmc.Model())
harness.main()

View file

@ -1,55 +1,55 @@
<?xml version='1.0' encoding='utf-8'?>
<geometry>
<cell fill="12" id="13" region="9 -10 11 -12 13 -14" universe="13" />
<dagmc_universe auto_geom_ids="true" filename="dagmc.h5m" id="9" />
<lattice id="12">
<pitch>24.0 24.0</pitch>
<dimension>2 2</dimension>
<lower_left>-24.0 -24.0</lower_left>
<universes>
9 9
9 9 </universes>
</lattice>
<surface boundary="reflective" coeffs="-24.0" id="9" name="left" type="x-plane" />
<surface boundary="reflective" coeffs="24.0" id="10" name="right" type="x-plane" />
<surface boundary="reflective" coeffs="-24.0" id="11" name="front" type="y-plane" />
<surface boundary="reflective" coeffs="24.0" id="12" name="back" type="y-plane" />
<surface boundary="reflective" coeffs="-10.0" id="13" name="bottom" type="z-plane" />
<surface boundary="reflective" coeffs="10.0" id="14" name="top" type="z-plane" />
</geometry>
<?xml version='1.0' encoding='utf-8'?>
<materials>
<material depletable="true" id="13" name="no-void fuel">
<density units="g/cc" value="10.29769" />
<nuclide ao="0.93120485" name="U234" />
<nuclide ao="0.00055815" name="U235" />
<nuclide ao="0.022408" name="U238" />
<nuclide ao="0.045829" name="O16" />
</material>
<material id="14" name="clad">
<density units="g/cc" value="6.55" />
<nuclide ao="0.021827" name="Zr90" />
<nuclide ao="0.00476" name="Zr91" />
<nuclide ao="0.0072758" name="Zr92" />
<nuclide ao="0.0073734" name="Zr94" />
<nuclide ao="0.0011879" name="Zr96" />
</material>
<material id="15" name="water">
<density units="g/cc" value="0.740582" />
<nuclide ao="0.049457" name="H1" />
<nuclide ao="0.024672" name="O16" />
<nuclide ao="8.0042e-06" name="B10" />
<nuclide ao="3.2218e-05" name="B11" />
<sab name="c_H_in_H2O" />
</material>
</materials>
<?xml version='1.0' encoding='utf-8'?>
<settings>
<run_mode>eigenvalue</run_mode>
<particles>100</particles>
<batches>10</batches>
<inactive>2</inactive>
<output>
<summary>false</summary>
</output>
</settings>
<model>
<materials>
<material depletable="true" id="1" name="no-void fuel">
<density units="g/cc" value="10.29769" />
<nuclide ao="0.93120485" name="U234" />
<nuclide ao="0.00055815" name="U235" />
<nuclide ao="0.022408" name="U238" />
<nuclide ao="0.045829" name="O16" />
</material>
<material id="2" name="clad">
<density units="g/cc" value="6.55" />
<nuclide ao="0.021827" name="Zr90" />
<nuclide ao="0.00476" name="Zr91" />
<nuclide ao="0.0072758" name="Zr92" />
<nuclide ao="0.0073734" name="Zr94" />
<nuclide ao="0.0011879" name="Zr96" />
</material>
<material id="3" name="water">
<density units="g/cc" value="0.740582" />
<nuclide ao="0.049457" name="H1" />
<nuclide ao="0.024672" name="O16" />
<nuclide ao="8.0042e-06" name="B10" />
<nuclide ao="3.2218e-05" name="B11" />
<sab name="c_H_in_H2O" />
</material>
</materials>
<geometry>
<cell fill="4" id="1" region="1 -2 3 -4 5 -6" universe="5" />
<dagmc_universe auto_geom_ids="true" filename="dagmc.h5m" id="1" />
<lattice id="4">
<pitch>24.0 24.0</pitch>
<dimension>2 2</dimension>
<lower_left>-24.0 -24.0</lower_left>
<universes>
1 1
1 1 </universes>
</lattice>
<surface boundary="reflective" coeffs="-24.0" id="1" name="left" type="x-plane" />
<surface boundary="reflective" coeffs="24.0" id="2" name="right" type="x-plane" />
<surface boundary="reflective" coeffs="-24.0" id="3" name="front" type="y-plane" />
<surface boundary="reflective" coeffs="24.0" id="4" name="back" type="y-plane" />
<surface boundary="reflective" coeffs="-10.0" id="5" name="bottom" type="z-plane" />
<surface boundary="reflective" coeffs="10.0" id="6" name="top" type="z-plane" />
</geometry>
<settings>
<run_mode>eigenvalue</run_mode>
<particles>100</particles>
<batches>10</batches>
<inactive>2</inactive>
<output>
<summary>false</summary>
</output>
</settings>
</model>

View file

@ -12,9 +12,8 @@ pytestmark = pytest.mark.skipif(
class DAGMCUniverseTest(PyAPITestHarness):
def _build_inputs(self):
model = openmc.model.Model()
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
### MATERIALS ###
fuel = openmc.Material(name='no-void fuel')
@ -40,7 +39,7 @@ class DAGMCUniverseTest(PyAPITestHarness):
water.add_nuclide('B11', 3.2218e-05)
water.add_s_alpha_beta('c_H_in_H2O')
model.materials = openmc.Materials([fuel, cladding, water])
self._model.materials = openmc.Materials([fuel, cladding, water])
### GEOMETRY ###
# create the DAGMC universe
@ -51,7 +50,7 @@ class DAGMCUniverseTest(PyAPITestHarness):
# uses the bound_dag_cell as the root argument to test the type checks in openmc.Geometry
bound_pincell_geometry = openmc.Geometry(root=bound_pincell_universe)
# assigns the bound_dag_geometry to the model to test the type checks in model.Geometry setter
model.Geometry = bound_pincell_geometry
self._model.geometry = bound_pincell_geometry
# create a 2 x 2 lattice using the DAGMC pincell
pitch = np.asarray((24.0, 24.0))
@ -71,17 +70,15 @@ class DAGMCUniverseTest(PyAPITestHarness):
bounding_region = +left & -right & +front & -back & +bottom & -top
bounding_cell = openmc.Cell(fill=lattice, region=bounding_region)
model.geometry = openmc.Geometry([bounding_cell])
self._model.geometry = openmc.Geometry([bounding_cell])
# settings
model.settings.particles = 100
model.settings.batches = 10
model.settings.inactive = 2
model.settings.output = {'summary' : False}
model.export_to_xml()
self._model.settings.particles = 100
self._model.settings.batches = 10
self._model.settings.inactive = 2
self._model.settings.output = {'summary' : False}
def test_univ():
harness = DAGMCUniverseTest('statepoint.10.h5')
harness = DAGMCUniverseTest('statepoint.10.h5', model=openmc.Model())
harness.main()

View file

@ -1,29 +1,28 @@
<?xml version='1.0' encoding='utf-8'?>
<geometry>
<dagmc_universe filename="dagmc.h5m" id="9" />
</geometry>
<?xml version='1.0' encoding='utf-8'?>
<materials>
</materials>
<?xml version='1.0' encoding='utf-8'?>
<settings>
<run_mode>eigenvalue</run_mode>
<particles>100</particles>
<batches>5</batches>
<inactive>0</inactive>
<source strength="1.0">
<space type="box">
<parameters>-4 -4 -4 4 4 4</parameters>
</space>
</source>
</settings>
<?xml version='1.0' encoding='utf-8'?>
<tallies>
<filter id="1" type="cell">
<bins>1</bins>
</filter>
<tally id="1">
<filters>1</filters>
<scores>total</scores>
</tally>
</tallies>
<model>
<materials>
</materials>
<geometry>
<dagmc_universe filename="dagmc.h5m" id="1" />
</geometry>
<settings>
<run_mode>eigenvalue</run_mode>
<particles>100</particles>
<batches>5</batches>
<inactive>0</inactive>
<source strength="1.0">
<space type="box">
<parameters>-4 -4 -4 4 4 4</parameters>
</space>
</source>
</settings>
<tallies>
<filter id="1" type="cell">
<bins>1</bins>
</filter>
<tally id="1">
<filters>1</filters>
<scores>total</scores>
</tally>
</tallies>
</model>

View file

@ -10,33 +10,29 @@ pytestmark = pytest.mark.skipif(
reason="DAGMC CAD geometry is not enabled.")
class UWUWTest(PyAPITestHarness):
def _build_inputs(self):
model = openmc.model.Model()
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
# settings
model.settings.batches = 5
model.settings.inactive = 0
model.settings.particles = 100
self._model.settings.batches = 5
self._model.settings.inactive = 0
self._model.settings.particles = 100
source = openmc.Source(space=Box([-4, -4, -4],
[ 4, 4, 4]))
model.settings.source = source
model.settings.export_to_xml()
self._model.settings.source = source
# geometry
dag_univ = openmc.DAGMCUniverse("dagmc.h5m")
model.geometry = openmc.Geometry(root=dag_univ)
self._model.geometry = openmc.Geometry(root=dag_univ)
# tally
tally = openmc.Tally()
tally.scores = ['total']
tally.filters = [openmc.CellFilter(1)]
model.tallies = [tally]
self._model.tallies = [tally]
model.export_to_xml()
def test_uwuw():
harness = UWUWTest('statepoint.5.h5')
harness = UWUWTest('statepoint.5.h5', model=openmc.Model())
harness.main()

View file

@ -1,38 +1,187 @@
<?xml version='1.0' encoding='utf-8'?>
<geometry>
<cell fill="200" id="1" region="-6 34 -35" universe="0" />
<cell fill="201" id="2" region="-6 35 -36" universe="0" />
<cell id="3" material="8" region="-7 31 -32" universe="0" />
<cell id="4" material="9" region="-5 32 -33" universe="0" />
<cell id="5" material="12" region="-5 33 -34" universe="0" />
<cell id="6" material="11" region="-5 36 -37" universe="0" />
<cell id="7" material="10" region="-5 37 -38" universe="0" />
<cell id="8" material="7" region="-7 38 -39" universe="0" />
<cell id="9" material="9" region="6 -7 32 -38" universe="0" />
<cell id="10" material="5" region="7 -8 31 -39" universe="0" />
<cell id="11" material="6" region="5 -6 32 -34" universe="0" />
<cell id="12" material="7" region="5 -6 36 -38" universe="0" />
<cell id="21" material="1" region="-1" universe="1" />
<cell id="22" material="2" region="1 -2" universe="1" />
<cell id="23" material="3" region="2" universe="1" />
<cell id="24" material="3" region="-3" universe="2" />
<cell id="25" material="2" region="3 -4" universe="2" />
<cell id="26" material="3" region="4" universe="2" />
<cell id="27" material="1" region="-1" universe="3" />
<cell id="28" material="2" region="1 -2" universe="3" />
<cell id="29" material="4" region="2" universe="3" />
<cell id="30" material="4" region="-3" universe="4" />
<cell id="31" material="2" region="3 -4" universe="4" />
<cell id="32" material="4" region="4" universe="4" />
<cell id="50" material="3" region="34 -35" universe="5" />
<cell fill="100" id="60" region="34 -35" universe="6" />
<cell id="70" material="4" region="35 -36" universe="7" />
<cell fill="101" id="80" region="35 -36" universe="8" />
<lattice id="100" name="Fuel assembly (lower half)">
<pitch>1.26 1.26</pitch>
<dimension>17 17</dimension>
<lower_left>-10.71 -10.71</lower_left>
<universes>
<model>
<materials>
<material depletable="true" id="1" name="UOX fuel">
<density units="g/cm3" value="10.062" />
<nuclide ao="4.9476e-06" name="U234" />
<nuclide ao="0.00048218" name="U235" />
<nuclide ao="0.021504" name="U238" />
<nuclide ao="1.0801e-08" name="Xe135" />
<nuclide ao="0.045737" name="O16" />
</material>
<material id="2" name="Zircaloy">
<density units="g/cm3" value="5.77" />
<nuclide ao="0.5145" name="Zr90" />
<nuclide ao="0.1122" name="Zr91" />
<nuclide ao="0.1715" name="Zr92" />
<nuclide ao="0.1738" name="Zr94" />
<nuclide ao="0.028" name="Zr96" />
</material>
<material id="3" name="Cold borated water">
<density units="atom/b-cm" value="0.07416" />
<nuclide ao="2.0" name="H1" />
<nuclide ao="1.0" name="O16" />
<nuclide ao="0.000649" name="B10" />
<nuclide ao="0.002689" name="B11" />
<sab name="c_H_in_H2O" />
</material>
<material id="4" name="Hot borated water">
<density units="atom/b-cm" value="0.06614" />
<nuclide ao="2.0" name="H1" />
<nuclide ao="1.0" name="O16" />
<nuclide ao="0.000649" name="B10" />
<nuclide ao="0.002689" name="B11" />
<sab name="c_H_in_H2O" />
</material>
<material id="5" name="Reactor pressure vessel steel">
<density units="g/cm3" value="7.9" />
<nuclide name="Fe54" wo="0.05437098" />
<nuclide name="Fe56" wo="0.88500663" />
<nuclide name="Fe57" wo="0.0208008" />
<nuclide name="Fe58" wo="0.00282159" />
<nuclide name="Ni58" wo="0.0067198" />
<nuclide name="Ni60" wo="0.0026776" />
<nuclide name="Mn55" wo="0.01" />
<nuclide name="Cr52" wo="0.002092475" />
<nuclide name="C0" wo="0.0025" />
<nuclide name="Cu63" wo="0.0013696" />
</material>
<material id="6" name="Lower radial reflector">
<density units="g/cm3" value="4.32" />
<nuclide name="H1" wo="0.0095661" />
<nuclide name="O16" wo="0.0759107" />
<nuclide name="B10" wo="3.08409e-05" />
<nuclide name="B11" wo="0.000140499" />
<nuclide name="Fe54" wo="0.035620772088" />
<nuclide name="Fe56" wo="0.579805982228" />
<nuclide name="Fe57" wo="0.01362750048" />
<nuclide name="Fe58" wo="0.001848545204" />
<nuclide name="Ni58" wo="0.055298376566" />
<nuclide name="Mn55" wo="0.018287" />
<nuclide name="Cr52" wo="0.145407678031" />
<sab name="c_H_in_H2O" />
</material>
<material id="7" name="Upper radial reflector / Top plate region">
<density units="g/cm3" value="4.28" />
<nuclide name="H1" wo="0.0086117" />
<nuclide name="O16" wo="0.0683369" />
<nuclide name="B10" wo="2.77638e-05" />
<nuclide name="B11" wo="0.000126481" />
<nuclide name="Fe54" wo="0.035953677186" />
<nuclide name="Fe56" wo="0.585224740891" />
<nuclide name="Fe57" wo="0.01375486056" />
<nuclide name="Fe58" wo="0.001865821363" />
<nuclide name="Ni58" wo="0.055815129186" />
<nuclide name="Mn55" wo="0.0184579" />
<nuclide name="Cr52" wo="0.146766614995" />
<sab name="c_H_in_H2O" />
</material>
<material id="8" name="Bottom plate region">
<density units="g/cm3" value="7.184" />
<nuclide name="H1" wo="0.0011505" />
<nuclide name="O16" wo="0.0091296" />
<nuclide name="B10" wo="3.70915e-06" />
<nuclide name="B11" wo="1.68974e-05" />
<nuclide name="Fe54" wo="0.03855611055" />
<nuclide name="Fe56" wo="0.627585036425" />
<nuclide name="Fe57" wo="0.014750478" />
<nuclide name="Fe58" wo="0.002000875025" />
<nuclide name="Ni58" wo="0.059855207342" />
<nuclide name="Mn55" wo="0.019794" />
<nuclide name="Cr52" wo="0.157390026871" />
<sab name="c_H_in_H2O" />
</material>
<material id="9" name="Bottom nozzle region">
<density units="g/cm3" value="2.53" />
<nuclide name="H1" wo="0.0245014" />
<nuclide name="O16" wo="0.1944274" />
<nuclide name="B10" wo="7.89917e-05" />
<nuclide name="B11" wo="0.000359854" />
<nuclide name="Fe54" wo="0.030411411144" />
<nuclide name="Fe56" wo="0.495012237964" />
<nuclide name="Fe57" wo="0.01163454624" />
<nuclide name="Fe58" wo="0.001578204652" />
<nuclide name="Ni58" wo="0.047211231662" />
<nuclide name="Mn55" wo="0.0156126" />
<nuclide name="Cr52" wo="0.124142524198" />
<sab name="c_H_in_H2O" />
</material>
<material id="10" name="Top nozzle region">
<density units="g/cm3" value="1.746" />
<nuclide name="H1" wo="0.035887" />
<nuclide name="O16" wo="0.2847761" />
<nuclide name="B10" wo="0.000115699" />
<nuclide name="B11" wo="0.000527075" />
<nuclide name="Fe54" wo="0.02644016154" />
<nuclide name="Fe56" wo="0.43037146399" />
<nuclide name="Fe57" wo="0.0101152584" />
<nuclide name="Fe58" wo="0.00137211607" />
<nuclide name="Ni58" wo="0.04104621835" />
<nuclide name="Mn55" wo="0.0135739" />
<nuclide name="Cr52" wo="0.107931450781" />
<sab name="c_H_in_H2O" />
</material>
<material id="11" name="Top of fuel assemblies">
<density units="g/cm3" value="3.044" />
<nuclide name="H1" wo="0.0162913" />
<nuclide name="O16" wo="0.1292776" />
<nuclide name="B10" wo="5.25228e-05" />
<nuclide name="B11" wo="0.000239272" />
<nuclide name="Zr90" wo="0.43313403903" />
<nuclide name="Zr91" wo="0.09549277374" />
<nuclide name="Zr92" wo="0.14759527104" />
<nuclide name="Zr94" wo="0.15280552077" />
<nuclide name="Zr96" wo="0.02511169542" />
<sab name="c_H_in_H2O" />
</material>
<material id="12" name="Bottom of fuel assemblies">
<density units="g/cm3" value="1.762" />
<nuclide name="H1" wo="0.0292856" />
<nuclide name="O16" wo="0.2323919" />
<nuclide name="B10" wo="9.44159e-05" />
<nuclide name="B11" wo="0.00043012" />
<nuclide name="Zr90" wo="0.3741373658" />
<nuclide name="Zr91" wo="0.0824858164" />
<nuclide name="Zr92" wo="0.1274914944" />
<nuclide name="Zr94" wo="0.1319920622" />
<nuclide name="Zr96" wo="0.0216912612" />
<sab name="c_H_in_H2O" />
</material>
</materials>
<geometry>
<cell fill="200" id="1" region="-6 34 -35" universe="0" />
<cell fill="201" id="2" region="-6 35 -36" universe="0" />
<cell id="3" material="8" region="-7 31 -32" universe="0" />
<cell id="4" material="9" region="-5 32 -33" universe="0" />
<cell id="5" material="12" region="-5 33 -34" universe="0" />
<cell id="6" material="11" region="-5 36 -37" universe="0" />
<cell id="7" material="10" region="-5 37 -38" universe="0" />
<cell id="8" material="7" region="-7 38 -39" universe="0" />
<cell id="9" material="9" region="6 -7 32 -38" universe="0" />
<cell id="10" material="5" region="7 -8 31 -39" universe="0" />
<cell id="11" material="6" region="5 -6 32 -34" universe="0" />
<cell id="12" material="7" region="5 -6 36 -38" universe="0" />
<cell id="21" material="1" region="-1" universe="1" />
<cell id="22" material="2" region="1 -2" universe="1" />
<cell id="23" material="3" region="2" universe="1" />
<cell id="24" material="3" region="-3" universe="2" />
<cell id="25" material="2" region="3 -4" universe="2" />
<cell id="26" material="3" region="4" universe="2" />
<cell id="27" material="1" region="-1" universe="3" />
<cell id="28" material="2" region="1 -2" universe="3" />
<cell id="29" material="4" region="2" universe="3" />
<cell id="30" material="4" region="-3" universe="4" />
<cell id="31" material="2" region="3 -4" universe="4" />
<cell id="32" material="4" region="4" universe="4" />
<cell id="50" material="3" region="34 -35" universe="5" />
<cell fill="100" id="60" region="34 -35" universe="6" />
<cell id="70" material="4" region="35 -36" universe="7" />
<cell fill="101" id="80" region="35 -36" universe="8" />
<lattice id="100" name="Fuel assembly (lower half)">
<pitch>1.26 1.26</pitch>
<dimension>17 17</dimension>
<lower_left>-10.71 -10.71</lower_left>
<universes>
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 2 1 1 2 1 1 2 1 1 1 1 1
@ -50,12 +199,12 @@
1 1 1 1 1 2 1 1 2 1 1 2 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 </universes>
</lattice>
<lattice id="101" name="Fuel assembly (upper half)">
<pitch>1.26 1.26</pitch>
<dimension>17 17</dimension>
<lower_left>-10.71 -10.71</lower_left>
<universes>
</lattice>
<lattice id="101" name="Fuel assembly (upper half)">
<pitch>1.26 1.26</pitch>
<dimension>17 17</dimension>
<lower_left>-10.71 -10.71</lower_left>
<universes>
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 4 3 3 4 3 3 4 3 3 3 3 3
@ -73,12 +222,12 @@
3 3 3 3 3 4 3 3 4 3 3 4 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 </universes>
</lattice>
<lattice id="200" name="Core lattice (lower half)">
<pitch>21.42 21.42</pitch>
<dimension>21 21</dimension>
<lower_left>-224.91 -224.91</lower_left>
<universes>
</lattice>
<lattice id="200" name="Core lattice (lower half)">
<pitch>21.42 21.42</pitch>
<dimension>21 21</dimension>
<lower_left>-224.91 -224.91</lower_left>
<universes>
5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
5 5 5 5 5 5 5 6 6 6 6 6 6 6 5 5 5 5 5 5 5
@ -100,12 +249,12 @@
5 5 5 5 5 5 5 6 6 6 6 6 6 6 5 5 5 5 5 5 5
5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 </universes>
</lattice>
<lattice id="201" name="Core lattice (lower half)">
<pitch>21.42 21.42</pitch>
<dimension>21 21</dimension>
<lower_left>-224.91 -224.91</lower_left>
<universes>
</lattice>
<lattice id="201" name="Core lattice (lower half)">
<pitch>21.42 21.42</pitch>
<dimension>21 21</dimension>
<lower_left>-224.91 -224.91</lower_left>
<universes>
7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7
7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7
7 7 7 7 7 7 7 8 8 8 8 8 8 8 7 7 7 7 7 7 7
@ -127,313 +276,163 @@
7 7 7 7 7 7 7 8 8 8 8 8 8 8 7 7 7 7 7 7 7
7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7
7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 </universes>
</lattice>
<surface coeffs="0.0 0.0 0.41" id="1" type="z-cylinder" />
<surface coeffs="0.0 0.0 0.475" id="2" type="z-cylinder" />
<surface coeffs="0.0 0.0 0.56" id="3" type="z-cylinder" />
<surface coeffs="0.0 0.0 0.62" id="4" type="z-cylinder" />
<surface coeffs="0.0 0.0 187.6" id="5" type="z-cylinder" />
<surface coeffs="0.0 0.0 209.0" id="6" type="z-cylinder" />
<surface coeffs="0.0 0.0 229.0" id="7" type="z-cylinder" />
<surface boundary="vacuum" coeffs="0.0 0.0 249.0" id="8" type="z-cylinder" />
<surface boundary="vacuum" coeffs="-229.0" id="31" type="z-plane" />
<surface coeffs="-199.0" id="32" type="z-plane" />
<surface coeffs="-193.0" id="33" type="z-plane" />
<surface coeffs="-183.0" id="34" type="z-plane" />
<surface coeffs="0.0" id="35" type="z-plane" />
<surface coeffs="183.0" id="36" type="z-plane" />
<surface coeffs="203.0" id="37" type="z-plane" />
<surface coeffs="215.0" id="38" type="z-plane" />
<surface boundary="vacuum" coeffs="223.0" id="39" type="z-plane" />
</geometry>
<?xml version='1.0' encoding='utf-8'?>
<materials>
<material depletable="true" id="1" name="UOX fuel">
<density units="g/cm3" value="10.062" />
<nuclide ao="4.9476e-06" name="U234" />
<nuclide ao="0.00048218" name="U235" />
<nuclide ao="0.021504" name="U238" />
<nuclide ao="1.0801e-08" name="Xe135" />
<nuclide ao="0.045737" name="O16" />
</material>
<material id="2" name="Zircaloy">
<density units="g/cm3" value="5.77" />
<nuclide ao="0.5145" name="Zr90" />
<nuclide ao="0.1122" name="Zr91" />
<nuclide ao="0.1715" name="Zr92" />
<nuclide ao="0.1738" name="Zr94" />
<nuclide ao="0.028" name="Zr96" />
</material>
<material id="3" name="Cold borated water">
<density units="atom/b-cm" value="0.07416" />
<nuclide ao="2.0" name="H1" />
<nuclide ao="1.0" name="O16" />
<nuclide ao="0.000649" name="B10" />
<nuclide ao="0.002689" name="B11" />
<sab name="c_H_in_H2O" />
</material>
<material id="4" name="Hot borated water">
<density units="atom/b-cm" value="0.06614" />
<nuclide ao="2.0" name="H1" />
<nuclide ao="1.0" name="O16" />
<nuclide ao="0.000649" name="B10" />
<nuclide ao="0.002689" name="B11" />
<sab name="c_H_in_H2O" />
</material>
<material id="5" name="Reactor pressure vessel steel">
<density units="g/cm3" value="7.9" />
<nuclide name="Fe54" wo="0.05437098" />
<nuclide name="Fe56" wo="0.88500663" />
<nuclide name="Fe57" wo="0.0208008" />
<nuclide name="Fe58" wo="0.00282159" />
<nuclide name="Ni58" wo="0.0067198" />
<nuclide name="Ni60" wo="0.0026776" />
<nuclide name="Mn55" wo="0.01" />
<nuclide name="Cr52" wo="0.002092475" />
<nuclide name="C0" wo="0.0025" />
<nuclide name="Cu63" wo="0.0013696" />
</material>
<material id="6" name="Lower radial reflector">
<density units="g/cm3" value="4.32" />
<nuclide name="H1" wo="0.0095661" />
<nuclide name="O16" wo="0.0759107" />
<nuclide name="B10" wo="3.08409e-05" />
<nuclide name="B11" wo="0.000140499" />
<nuclide name="Fe54" wo="0.035620772088" />
<nuclide name="Fe56" wo="0.579805982228" />
<nuclide name="Fe57" wo="0.01362750048" />
<nuclide name="Fe58" wo="0.001848545204" />
<nuclide name="Ni58" wo="0.055298376566" />
<nuclide name="Mn55" wo="0.018287" />
<nuclide name="Cr52" wo="0.145407678031" />
<sab name="c_H_in_H2O" />
</material>
<material id="7" name="Upper radial reflector / Top plate region">
<density units="g/cm3" value="4.28" />
<nuclide name="H1" wo="0.0086117" />
<nuclide name="O16" wo="0.0683369" />
<nuclide name="B10" wo="2.77638e-05" />
<nuclide name="B11" wo="0.000126481" />
<nuclide name="Fe54" wo="0.035953677186" />
<nuclide name="Fe56" wo="0.585224740891" />
<nuclide name="Fe57" wo="0.01375486056" />
<nuclide name="Fe58" wo="0.001865821363" />
<nuclide name="Ni58" wo="0.055815129186" />
<nuclide name="Mn55" wo="0.0184579" />
<nuclide name="Cr52" wo="0.146766614995" />
<sab name="c_H_in_H2O" />
</material>
<material id="8" name="Bottom plate region">
<density units="g/cm3" value="7.184" />
<nuclide name="H1" wo="0.0011505" />
<nuclide name="O16" wo="0.0091296" />
<nuclide name="B10" wo="3.70915e-06" />
<nuclide name="B11" wo="1.68974e-05" />
<nuclide name="Fe54" wo="0.03855611055" />
<nuclide name="Fe56" wo="0.627585036425" />
<nuclide name="Fe57" wo="0.014750478" />
<nuclide name="Fe58" wo="0.002000875025" />
<nuclide name="Ni58" wo="0.059855207342" />
<nuclide name="Mn55" wo="0.019794" />
<nuclide name="Cr52" wo="0.157390026871" />
<sab name="c_H_in_H2O" />
</material>
<material id="9" name="Bottom nozzle region">
<density units="g/cm3" value="2.53" />
<nuclide name="H1" wo="0.0245014" />
<nuclide name="O16" wo="0.1944274" />
<nuclide name="B10" wo="7.89917e-05" />
<nuclide name="B11" wo="0.000359854" />
<nuclide name="Fe54" wo="0.030411411144" />
<nuclide name="Fe56" wo="0.495012237964" />
<nuclide name="Fe57" wo="0.01163454624" />
<nuclide name="Fe58" wo="0.001578204652" />
<nuclide name="Ni58" wo="0.047211231662" />
<nuclide name="Mn55" wo="0.0156126" />
<nuclide name="Cr52" wo="0.124142524198" />
<sab name="c_H_in_H2O" />
</material>
<material id="10" name="Top nozzle region">
<density units="g/cm3" value="1.746" />
<nuclide name="H1" wo="0.035887" />
<nuclide name="O16" wo="0.2847761" />
<nuclide name="B10" wo="0.000115699" />
<nuclide name="B11" wo="0.000527075" />
<nuclide name="Fe54" wo="0.02644016154" />
<nuclide name="Fe56" wo="0.43037146399" />
<nuclide name="Fe57" wo="0.0101152584" />
<nuclide name="Fe58" wo="0.00137211607" />
<nuclide name="Ni58" wo="0.04104621835" />
<nuclide name="Mn55" wo="0.0135739" />
<nuclide name="Cr52" wo="0.107931450781" />
<sab name="c_H_in_H2O" />
</material>
<material id="11" name="Top of fuel assemblies">
<density units="g/cm3" value="3.044" />
<nuclide name="H1" wo="0.0162913" />
<nuclide name="O16" wo="0.1292776" />
<nuclide name="B10" wo="5.25228e-05" />
<nuclide name="B11" wo="0.000239272" />
<nuclide name="Zr90" wo="0.43313403903" />
<nuclide name="Zr91" wo="0.09549277374" />
<nuclide name="Zr92" wo="0.14759527104" />
<nuclide name="Zr94" wo="0.15280552077" />
<nuclide name="Zr96" wo="0.02511169542" />
<sab name="c_H_in_H2O" />
</material>
<material id="12" name="Bottom of fuel assemblies">
<density units="g/cm3" value="1.762" />
<nuclide name="H1" wo="0.0292856" />
<nuclide name="O16" wo="0.2323919" />
<nuclide name="B10" wo="9.44159e-05" />
<nuclide name="B11" wo="0.00043012" />
<nuclide name="Zr90" wo="0.3741373658" />
<nuclide name="Zr91" wo="0.0824858164" />
<nuclide name="Zr92" wo="0.1274914944" />
<nuclide name="Zr94" wo="0.1319920622" />
<nuclide name="Zr96" wo="0.0216912612" />
<sab name="c_H_in_H2O" />
</material>
</materials>
<?xml version='1.0' encoding='utf-8'?>
<settings>
<run_mode>eigenvalue</run_mode>
<particles>100</particles>
<batches>3</batches>
<inactive>0</inactive>
<source strength="1.0">
<space type="box">
<parameters>-160 -160 -183 160 160 183</parameters>
</space>
</source>
<temperature_multipole>true</temperature_multipole>
</settings>
<?xml version='1.0' encoding='utf-8'?>
<tallies>
<filter id="1" type="material">
<bins>1 3</bins>
</filter>
<filter id="2" type="energyout">
<bins>0.0 0.625 20000000.0</bins>
</filter>
<tally id="1">
<filters>1</filters>
<scores>flux</scores>
<derivative>1</derivative>
</tally>
<tally id="2">
<filters>1</filters>
<scores>flux</scores>
<derivative>2</derivative>
</tally>
<tally id="3">
<filters>1</filters>
<scores>flux</scores>
<derivative>3</derivative>
</tally>
<tally id="4">
<filters>1</filters>
<scores>flux</scores>
<derivative>4</derivative>
</tally>
<tally id="5">
<filters>1</filters>
<scores>flux</scores>
<derivative>5</derivative>
</tally>
<tally id="6">
<filters>1</filters>
<nuclides>total U235</nuclides>
<scores>total absorption scatter fission nu-fission</scores>
<derivative>1</derivative>
</tally>
<tally id="7">
<filters>1</filters>
<nuclides>total U235</nuclides>
<scores>total absorption scatter fission nu-fission</scores>
<derivative>2</derivative>
</tally>
<tally id="8">
<filters>1</filters>
<nuclides>total U235</nuclides>
<scores>total absorption scatter fission nu-fission</scores>
<derivative>3</derivative>
</tally>
<tally id="9">
<filters>1</filters>
<nuclides>total U235</nuclides>
<scores>total absorption scatter fission nu-fission</scores>
<derivative>4</derivative>
</tally>
<tally id="10">
<filters>1</filters>
<nuclides>total U235</nuclides>
<scores>total absorption scatter fission nu-fission</scores>
<derivative>5</derivative>
</tally>
<tally id="11">
<filters>1</filters>
<scores>absorption</scores>
<estimator>analog</estimator>
<derivative>1</derivative>
</tally>
<tally id="12">
<filters>1</filters>
<scores>absorption</scores>
<estimator>analog</estimator>
<derivative>2</derivative>
</tally>
<tally id="13">
<filters>1</filters>
<scores>absorption</scores>
<estimator>analog</estimator>
<derivative>3</derivative>
</tally>
<tally id="14">
<filters>1</filters>
<scores>absorption</scores>
<estimator>analog</estimator>
<derivative>4</derivative>
</tally>
<tally id="15">
<filters>1</filters>
<scores>absorption</scores>
<estimator>analog</estimator>
<derivative>5</derivative>
</tally>
<tally id="16">
<filters>1 2</filters>
<nuclides>total U235</nuclides>
<scores>nu-fission scatter</scores>
<derivative>1</derivative>
</tally>
<tally id="17">
<filters>1 2</filters>
<nuclides>total U235</nuclides>
<scores>nu-fission scatter</scores>
<derivative>2</derivative>
</tally>
<tally id="18">
<filters>1 2</filters>
<nuclides>U235</nuclides>
<scores>nu-fission scatter</scores>
<derivative>3</derivative>
</tally>
<tally id="19">
<filters>1 2</filters>
<nuclides>U235</nuclides>
<scores>nu-fission scatter</scores>
<derivative>4</derivative>
</tally>
<tally id="20">
<filters>1 2</filters>
<nuclides>U235</nuclides>
<scores>nu-fission scatter</scores>
<derivative>5</derivative>
</tally>
<derivative id="1" material="3" variable="density" />
<derivative id="2" material="1" variable="density" />
<derivative id="3" material="1" nuclide="O16" variable="nuclide_density" />
<derivative id="4" material="1" nuclide="U235" variable="nuclide_density" />
<derivative id="5" material="1" variable="temperature" />
</tallies>
</lattice>
<surface coeffs="0.0 0.0 0.41" id="1" type="z-cylinder" />
<surface coeffs="0.0 0.0 0.475" id="2" type="z-cylinder" />
<surface coeffs="0.0 0.0 0.56" id="3" type="z-cylinder" />
<surface coeffs="0.0 0.0 0.62" id="4" type="z-cylinder" />
<surface coeffs="0.0 0.0 187.6" id="5" type="z-cylinder" />
<surface coeffs="0.0 0.0 209.0" id="6" type="z-cylinder" />
<surface coeffs="0.0 0.0 229.0" id="7" type="z-cylinder" />
<surface boundary="vacuum" coeffs="0.0 0.0 249.0" id="8" type="z-cylinder" />
<surface boundary="vacuum" coeffs="-229.0" id="31" type="z-plane" />
<surface coeffs="-199.0" id="32" type="z-plane" />
<surface coeffs="-193.0" id="33" type="z-plane" />
<surface coeffs="-183.0" id="34" type="z-plane" />
<surface coeffs="0.0" id="35" type="z-plane" />
<surface coeffs="183.0" id="36" type="z-plane" />
<surface coeffs="203.0" id="37" type="z-plane" />
<surface coeffs="215.0" id="38" type="z-plane" />
<surface boundary="vacuum" coeffs="223.0" id="39" type="z-plane" />
</geometry>
<settings>
<run_mode>eigenvalue</run_mode>
<particles>100</particles>
<batches>3</batches>
<inactive>0</inactive>
<source strength="1.0">
<space type="box">
<parameters>-160 -160 -183 160 160 183</parameters>
</space>
</source>
<temperature_multipole>true</temperature_multipole>
</settings>
<tallies>
<filter id="1" type="material">
<bins>1 3</bins>
</filter>
<filter id="2" type="energyout">
<bins>0.0 0.625 20000000.0</bins>
</filter>
<tally id="1">
<filters>1</filters>
<scores>flux</scores>
<derivative>1</derivative>
</tally>
<tally id="2">
<filters>1</filters>
<scores>flux</scores>
<derivative>2</derivative>
</tally>
<tally id="3">
<filters>1</filters>
<scores>flux</scores>
<derivative>3</derivative>
</tally>
<tally id="4">
<filters>1</filters>
<scores>flux</scores>
<derivative>4</derivative>
</tally>
<tally id="5">
<filters>1</filters>
<scores>flux</scores>
<derivative>5</derivative>
</tally>
<tally id="6">
<filters>1</filters>
<nuclides>total U235</nuclides>
<scores>total absorption scatter fission nu-fission</scores>
<derivative>1</derivative>
</tally>
<tally id="7">
<filters>1</filters>
<nuclides>total U235</nuclides>
<scores>total absorption scatter fission nu-fission</scores>
<derivative>2</derivative>
</tally>
<tally id="8">
<filters>1</filters>
<nuclides>total U235</nuclides>
<scores>total absorption scatter fission nu-fission</scores>
<derivative>3</derivative>
</tally>
<tally id="9">
<filters>1</filters>
<nuclides>total U235</nuclides>
<scores>total absorption scatter fission nu-fission</scores>
<derivative>4</derivative>
</tally>
<tally id="10">
<filters>1</filters>
<nuclides>total U235</nuclides>
<scores>total absorption scatter fission nu-fission</scores>
<derivative>5</derivative>
</tally>
<tally id="11">
<filters>1</filters>
<scores>absorption</scores>
<estimator>analog</estimator>
<derivative>1</derivative>
</tally>
<tally id="12">
<filters>1</filters>
<scores>absorption</scores>
<estimator>analog</estimator>
<derivative>2</derivative>
</tally>
<tally id="13">
<filters>1</filters>
<scores>absorption</scores>
<estimator>analog</estimator>
<derivative>3</derivative>
</tally>
<tally id="14">
<filters>1</filters>
<scores>absorption</scores>
<estimator>analog</estimator>
<derivative>4</derivative>
</tally>
<tally id="15">
<filters>1</filters>
<scores>absorption</scores>
<estimator>analog</estimator>
<derivative>5</derivative>
</tally>
<tally id="16">
<filters>1 2</filters>
<nuclides>total U235</nuclides>
<scores>nu-fission scatter</scores>
<derivative>1</derivative>
</tally>
<tally id="17">
<filters>1 2</filters>
<nuclides>total U235</nuclides>
<scores>nu-fission scatter</scores>
<derivative>2</derivative>
</tally>
<tally id="18">
<filters>1 2</filters>
<nuclides>U235</nuclides>
<scores>nu-fission scatter</scores>
<derivative>3</derivative>
</tally>
<tally id="19">
<filters>1 2</filters>
<nuclides>U235</nuclides>
<scores>nu-fission scatter</scores>
<derivative>4</derivative>
</tally>
<tally id="20">
<filters>1 2</filters>
<nuclides>U235</nuclides>
<scores>nu-fission scatter</scores>
<derivative>5</derivative>
</tally>
<derivative id="1" material="3" variable="density" />
<derivative id="2" material="1" variable="density" />
<derivative id="3" material="1" nuclide="O16" variable="nuclide_density" />
<derivative id="4" material="1" nuclide="U235" variable="nuclide_density" />
<derivative id="5" material="1" variable="temperature" />
</tallies>
</model>

View file

@ -1,62 +1,61 @@
<?xml version='1.0' encoding='utf-8'?>
<geometry>
<cell id="1" material="1" universe="1" />
<cell id="11" material="2 void 3 2" region="-9" universe="11" />
<cell id="12" material="1" region="9" universe="11" />
<cell fill="101" id="101" region="10 -11 12 -13" universe="0" />
<lattice id="101">
<pitch>2.0 2.0</pitch>
<outer>1</outer>
<dimension>2 2</dimension>
<lower_left>-2.0 -2.0</lower_left>
<universes>
<model>
<materials>
<material id="1">
<density units="g/cc" value="1.0" />
<nuclide ao="2.0" name="H1" />
<nuclide ao="1.0" name="O16" />
</material>
<material depletable="true" id="2">
<density units="g/cc" value="4.5" />
<nuclide ao="1.0" name="U235" />
</material>
<material depletable="true" id="3">
<density units="g/cc" value="2.0" />
<nuclide ao="1.0" name="U235" />
</material>
</materials>
<geometry>
<cell id="1" material="1" universe="1" />
<cell id="11" material="2 void 3 2" region="-1" universe="11" />
<cell id="12" material="1" region="1" universe="11" />
<cell fill="101" id="101" region="2 -3 4 -5" universe="0" />
<lattice id="101">
<pitch>2.0 2.0</pitch>
<outer>1</outer>
<dimension>2 2</dimension>
<lower_left>-2.0 -2.0</lower_left>
<universes>
11 11
11 11 </universes>
</lattice>
<surface coeffs="0.0 0.0 0.3" id="9" type="z-cylinder" />
<surface boundary="reflective" coeffs="-3.0" id="10" type="x-plane" />
<surface boundary="reflective" coeffs="3.0" id="11" type="x-plane" />
<surface boundary="reflective" coeffs="-3.0" id="12" type="y-plane" />
<surface boundary="reflective" coeffs="3.0" id="13" type="y-plane" />
</geometry>
<?xml version='1.0' encoding='utf-8'?>
<materials>
<material id="1">
<density units="g/cc" value="1.0" />
<nuclide ao="2.0" name="H1" />
<nuclide ao="1.0" name="O16" />
</material>
<material depletable="true" id="2">
<density units="g/cc" value="4.5" />
<nuclide ao="1.0" name="U235" />
</material>
<material depletable="true" id="3">
<density units="g/cc" value="2.0" />
<nuclide ao="1.0" name="U235" />
</material>
</materials>
<?xml version='1.0' encoding='utf-8'?>
<settings>
<run_mode>eigenvalue</run_mode>
<particles>1000</particles>
<batches>5</batches>
<inactive>0</inactive>
<source strength="1.0">
<space type="box">
<parameters>-1 -1 -1 1 1 1</parameters>
</space>
</source>
</settings>
<?xml version='1.0' encoding='utf-8'?>
<plots>
<plot basis="xy" color_by="cell" filename="cellplot" id="1" type="slice">
<origin>0 0 0</origin>
<width>7 7</width>
<pixels>400 400</pixels>
</plot>
<plot basis="xy" color_by="material" filename="matplot" id="2" type="slice">
<origin>0 0 0</origin>
<width>7 7</width>
<pixels>400 400</pixels>
</plot>
</plots>
</lattice>
<surface coeffs="0.0 0.0 0.3" id="1" type="z-cylinder" />
<surface boundary="reflective" coeffs="-3.0" id="2" type="x-plane" />
<surface boundary="reflective" coeffs="3.0" id="3" type="x-plane" />
<surface boundary="reflective" coeffs="-3.0" id="4" type="y-plane" />
<surface boundary="reflective" coeffs="3.0" id="5" type="y-plane" />
</geometry>
<settings>
<run_mode>eigenvalue</run_mode>
<particles>1000</particles>
<batches>5</batches>
<inactive>0</inactive>
<source strength="1.0">
<space type="box">
<parameters>-1 -1 -1 1 1 1</parameters>
</space>
</source>
</settings>
<plots>
<plot basis="xy" color_by="cell" filename="cellplot" id="1" type="slice">
<origin>0 0 0</origin>
<width>7 7</width>
<pixels>400 400</pixels>
</plot>
<plot basis="xy" color_by="material" filename="matplot" id="2" type="slice">
<origin>0 0 0</origin>
<width>7 7</width>
<pixels>400 400</pixels>
</plot>
</plots>
</model>

View file

@ -4,7 +4,7 @@ Cell
ID = 11
Name =
Fill = [2, None, 3, 2]
Region = -9
Region = -1
Rotation = None
Translation = None
Volume = None

View file

@ -4,7 +4,8 @@ from tests.testing_harness import TestHarness, PyAPITestHarness
class DistribmatTestHarness(PyAPITestHarness):
def _build_inputs(self):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
####################
# Materials
####################
@ -22,8 +23,8 @@ class DistribmatTestHarness(PyAPITestHarness):
light_fuel.set_density('g/cc', 2.0)
light_fuel.add_nuclide('U235', 1.0)
mats_file = openmc.Materials([moderator, dense_fuel, light_fuel])
mats_file.export_to_xml()
self._model.materials = openmc.Materials([moderator, dense_fuel,
light_fuel])
####################
# Geometry
@ -54,8 +55,7 @@ class DistribmatTestHarness(PyAPITestHarness):
c101.region = +x0 & -x1 & +y0 & -y1
root_univ = openmc.Universe(universe_id=0, cells=[c101])
geometry = openmc.Geometry(root_univ)
geometry.export_to_xml()
self._model.geometry = openmc.Geometry(root_univ)
####################
# Settings
@ -67,7 +67,7 @@ class DistribmatTestHarness(PyAPITestHarness):
sets_file.particles = 1000
sets_file.source = openmc.Source(space=openmc.stats.Box(
[-1, -1, -1], [1, 1, 1]))
sets_file.export_to_xml()
self._model.settings = sets_file
####################
# Plots
@ -89,8 +89,7 @@ class DistribmatTestHarness(PyAPITestHarness):
plot2.width = (7, 7)
plot2.pixels = (400, 400)
plots = openmc.Plots([plot1, plot2])
plots.export_to_xml()
self._model.plots = openmc.Plots([plot1, plot2])
def _get_results(self):
outstr = super()._get_results()
@ -100,5 +99,5 @@ class DistribmatTestHarness(PyAPITestHarness):
def test_distribmat():
harness = DistribmatTestHarness('statepoint.5.h5')
harness = DistribmatTestHarness('statepoint.5.h5', model=openmc.Model())
harness.main()

View file

@ -1,31 +1,30 @@
<?xml version='1.0' encoding='utf-8'?>
<geometry>
<cell id="1" material="1" region="-1" universe="1" />
<surface boundary="vacuum" coeffs="0.0 0.0 0.0 10.0" id="1" type="sphere" />
</geometry>
<?xml version='1.0' encoding='utf-8'?>
<materials>
<material depletable="true" id="1">
<density units="g/cm3" value="4.5" />
<nuclide ao="1.0" name="U235" />
</material>
</materials>
<?xml version='1.0' encoding='utf-8'?>
<settings>
<run_mode>eigenvalue</run_mode>
<particles>1000</particles>
<batches>7</batches>
<inactive>3</inactive>
<generations_per_batch>3</generations_per_batch>
<source strength="1.0">
<space type="box">
<parameters>-4.0 -4.0 -4.0 4.0 4.0 4.0</parameters>
</space>
</source>
</settings>
<?xml version='1.0' encoding='utf-8'?>
<tallies>
<tally id="1">
<scores>flux</scores>
</tally>
</tallies>
<model>
<materials>
<material depletable="true" id="1">
<density units="g/cm3" value="4.5" />
<nuclide ao="1.0" name="U235" />
</material>
</materials>
<geometry>
<cell id="1" material="1" region="-1" universe="1" />
<surface boundary="vacuum" coeffs="0.0 0.0 0.0 10.0" id="1" type="sphere" />
</geometry>
<settings>
<run_mode>eigenvalue</run_mode>
<particles>1000</particles>
<batches>7</batches>
<inactive>3</inactive>
<generations_per_batch>3</generations_per_batch>
<source strength="1.0">
<space type="box">
<parameters>-4.0 -4.0 -4.0 4.0 4.0 4.0</parameters>
</space>
</source>
</settings>
<tallies>
<tally id="1">
<scores>flux</scores>
</tally>
</tallies>
</model>

View file

@ -1,42 +1,41 @@
<?xml version='1.0' encoding='utf-8'?>
<geometry>
<cell id="1" material="1" name="box" region="1 -2 3 -4 5 -6" universe="0" />
<surface boundary="reflective" coeffs="-1" id="1" type="x-plane" />
<surface boundary="reflective" coeffs="1" id="2" type="x-plane" />
<surface boundary="reflective" coeffs="-1" id="3" type="y-plane" />
<surface boundary="reflective" coeffs="1" id="4" type="y-plane" />
<surface boundary="reflective" coeffs="-1" id="5" type="z-plane" />
<surface boundary="reflective" coeffs="1" id="6" type="z-plane" />
</geometry>
<?xml version='1.0' encoding='utf-8'?>
<materials>
<material id="1" name="mat">
<density units="atom/b-cm" value="0.069335" />
<nuclide ao="40.0" name="H1" />
</material>
</materials>
<?xml version='1.0' encoding='utf-8'?>
<settings>
<run_mode>fixed source</run_mode>
<particles>100</particles>
<batches>10</batches>
<source strength="1.0">
<space type="box">
<parameters>-1 -1 -1 1 1 1</parameters>
</space>
<energy parameters="988000.0 2.249e-06" type="watt" />
</source>
<cutoff>
<energy_neutron>4.0</energy_neutron>
</cutoff>
</settings>
<?xml version='1.0' encoding='utf-8'?>
<tallies>
<filter id="1" type="energy">
<bins>0.0 4.0</bins>
</filter>
<tally id="1">
<filters>1</filters>
<scores>flux</scores>
</tally>
</tallies>
<model>
<materials>
<material id="1" name="mat">
<density units="atom/b-cm" value="0.069335" />
<nuclide ao="40.0" name="H1" />
</material>
</materials>
<geometry>
<cell id="1" material="1" name="box" region="1 -2 3 -4 5 -6" universe="0" />
<surface boundary="reflective" coeffs="-1" id="1" type="x-plane" />
<surface boundary="reflective" coeffs="1" id="2" type="x-plane" />
<surface boundary="reflective" coeffs="-1" id="3" type="y-plane" />
<surface boundary="reflective" coeffs="1" id="4" type="y-plane" />
<surface boundary="reflective" coeffs="-1" id="5" type="z-plane" />
<surface boundary="reflective" coeffs="1" id="6" type="z-plane" />
</geometry>
<settings>
<run_mode>fixed source</run_mode>
<particles>100</particles>
<batches>10</batches>
<source strength="1.0">
<space type="box">
<parameters>-1 -1 -1 1 1 1</parameters>
</space>
<energy parameters="988000.0 2.249e-06" type="watt" />
</source>
<cutoff>
<energy_neutron>4.0</energy_neutron>
</cutoff>
</settings>
<tallies>
<filter id="1" type="energy">
<bins>0.0 4.0</bins>
</filter>
<tally id="1">
<filters>1</filters>
<scores>flux</scores>
</tally>
</tallies>
</model>

View file

@ -4,7 +4,8 @@ from tests.testing_harness import PyAPITestHarness
class EnergyCutoffTestHarness(PyAPITestHarness):
def _build_inputs(self):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
# Set energy cutoff
energy_cutoff = 4.0
@ -12,8 +13,7 @@ class EnergyCutoffTestHarness(PyAPITestHarness):
mat = openmc.Material(material_id=1, name='mat')
mat.set_density('atom/b-cm', 0.069335)
mat.add_nuclide('H1', 40.0)
materials_file = openmc.Materials([mat])
materials_file.export_to_xml()
self._model.materials = openmc.Materials([mat])
# Cell is box with reflective boundary
x1 = openmc.XPlane(surface_id=1, x0=-1)
@ -29,8 +29,7 @@ class EnergyCutoffTestHarness(PyAPITestHarness):
box.fill = mat
root = openmc.Universe(universe_id=0, name='root universe')
root.add_cell(box)
geometry = openmc.Geometry(root)
geometry.export_to_xml()
self._model.geometry = openmc.Geometry(root)
# Set the running parameters
settings_file = openmc.Settings()
@ -43,7 +42,7 @@ class EnergyCutoffTestHarness(PyAPITestHarness):
watt_dist = openmc.stats.Watt()
settings_file.source = openmc.source.Source(space=uniform_dist,
energy=watt_dist)
settings_file.export_to_xml()
self._model.settings = settings_file
# Tally flux under energy cutoff
tallies = openmc.Tallies()
@ -52,7 +51,7 @@ class EnergyCutoffTestHarness(PyAPITestHarness):
energy_filter = openmc.filter.EnergyFilter((0.0, energy_cutoff))
tally.filters = [energy_filter]
tallies.append(tally)
tallies.export_to_xml()
self._model.tallies = tallies
def _get_results(self):
"""Digest info in the statepoint and return as a string."""
@ -70,5 +69,5 @@ class EnergyCutoffTestHarness(PyAPITestHarness):
def test_energy_cutoff():
harness = EnergyCutoffTestHarness('statepoint.10.h5')
harness = EnergyCutoffTestHarness('statepoint.10.h5', model=openmc.Model())
harness.main()

View file

@ -1,23 +1,23 @@
<?xml version='1.0' encoding='utf-8'?>
<geometry>
<cell id="1" material="1" region="-1" universe="1" />
<surface boundary="reflective" coeffs="0.0 0.0 0.0 100.0" id="1" type="sphere" />
</geometry>
<?xml version='1.0' encoding='utf-8'?>
<materials>
<material depletable="true" id="1">
<density units="g/cm3" value="20.0" />
<nuclide ao="1.0" name="U233" />
<nuclide ao="1.0" name="Am244" />
<nuclide ao="1.0" name="H2" />
<nuclide ao="1.0" name="Na23" />
<nuclide ao="1.0" name="Ta181" />
</material>
</materials>
<?xml version='1.0' encoding='utf-8'?>
<settings>
<run_mode>eigenvalue</run_mode>
<particles>1000</particles>
<batches>10</batches>
<inactive>5</inactive>
</settings>
<model>
<materials>
<material depletable="true" id="1">
<density units="g/cm3" value="20.0" />
<nuclide ao="1.0" name="U233" />
<nuclide ao="1.0" name="Am244" />
<nuclide ao="1.0" name="H2" />
<nuclide ao="1.0" name="Na23" />
<nuclide ao="1.0" name="Ta181" />
</material>
</materials>
<geometry>
<cell id="1" material="1" region="-1" universe="1" />
<surface boundary="reflective" coeffs="0.0 0.0 0.0 100.0" id="1" type="sphere" />
</geometry>
<settings>
<run_mode>eigenvalue</run_mode>
<particles>1000</particles>
<batches>10</batches>
<inactive>5</inactive>
</settings>
</model>

View file

@ -1,73 +1,72 @@
<?xml version='1.0' encoding='utf-8'?>
<geometry>
<cell id="1" material="1" name="fuel" region="1 -2 3 -4 5 -6" universe="1" />
<cell id="2" material="2" name="clad" region="(-1 | 2 | -3 | 4 | -5 | 6) (7 -8 9 -10 11 -12)" universe="1" />
<cell id="3" material="3" name="water" region="(-7 | 8 | -9 | 10 | -11 | 12) (13 -14 15 -16 17 -18)" universe="1" />
<surface coeffs="-5.0" id="1" name="minimum x" type="x-plane" />
<surface coeffs="5.0" id="2" name="maximum x" type="x-plane" />
<surface coeffs="-5.0" id="3" name="minimum y" type="y-plane" />
<surface coeffs="5.0" id="4" name="maximum y" type="y-plane" />
<surface coeffs="-5.0" id="5" name="minimum z" type="z-plane" />
<surface coeffs="5.0" id="6" name="maximum z" type="z-plane" />
<surface coeffs="-6.0" id="7" name="minimum x" type="x-plane" />
<surface coeffs="6.0" id="8" name="maximum x" type="x-plane" />
<surface coeffs="-6.0" id="9" name="minimum y" type="y-plane" />
<surface coeffs="6.0" id="10" name="maximum y" type="y-plane" />
<surface coeffs="-6.0" id="11" name="minimum z" type="z-plane" />
<surface coeffs="6.0" id="12" name="maximum z" type="z-plane" />
<surface boundary="vacuum" coeffs="-10" id="13" name="minimum x" type="x-plane" />
<surface boundary="vacuum" coeffs="10" id="14" name="maximum x" type="x-plane" />
<surface boundary="vacuum" coeffs="-10" id="15" name="minimum y" type="y-plane" />
<surface boundary="vacuum" coeffs="10" id="16" name="maximum y" type="y-plane" />
<surface boundary="vacuum" coeffs="-10" id="17" name="minimum z" type="z-plane" />
<surface boundary="vacuum" coeffs="10" id="18" name="maximum z" type="z-plane" />
</geometry>
<?xml version='1.0' encoding='utf-8'?>
<materials>
<material depletable="true" id="1" name="fuel">
<density units="g/cc" value="4.5" />
<nuclide ao="1.0" name="U235" />
</material>
<material id="2" name="zircaloy">
<density units="g/cc" value="5.77" />
<nuclide ao="0.5145" name="Zr90" />
<nuclide ao="0.1122" name="Zr91" />
<nuclide ao="0.1715" name="Zr92" />
<nuclide ao="0.1738" name="Zr94" />
<nuclide ao="0.028" name="Zr96" />
</material>
<material id="3" name="water">
<density units="atom/b-cm" value="0.07416" />
<nuclide ao="2.0" name="H1" />
<nuclide ao="1.0" name="O16" />
</material>
</materials>
<?xml version='1.0' encoding='utf-8'?>
<settings>
<run_mode>fixed source</run_mode>
<particles>100</particles>
<batches>10</batches>
<source strength="1.0">
<space type="point">
<parameters>0.0 0.0 0.0</parameters>
</space>
<angle reference_uvw="-1.0 0.0 0.0" type="monodirectional" />
<energy type="discrete">
<parameters>15000000.0 1.0</parameters>
</energy>
</source>
</settings>
<?xml version='1.0' encoding='utf-8'?>
<tallies>
<mesh id="1" library="moab" type="unstructured">
<filename>test_mesh_tets.h5m</filename>
</mesh>
<filter id="1" type="mesh">
<bins>1</bins>
</filter>
<tally id="1" name="unstructured mesh tally">
<filters>1</filters>
<scores>flux</scores>
<estimator>tracklength</estimator>
</tally>
</tallies>
<model>
<materials>
<material depletable="true" id="1" name="fuel">
<density units="g/cc" value="4.5" />
<nuclide ao="1.0" name="U235" />
</material>
<material id="2" name="zircaloy">
<density units="g/cc" value="5.77" />
<nuclide ao="0.5145" name="Zr90" />
<nuclide ao="0.1122" name="Zr91" />
<nuclide ao="0.1715" name="Zr92" />
<nuclide ao="0.1738" name="Zr94" />
<nuclide ao="0.028" name="Zr96" />
</material>
<material id="3" name="water">
<density units="atom/b-cm" value="0.07416" />
<nuclide ao="2.0" name="H1" />
<nuclide ao="1.0" name="O16" />
</material>
</materials>
<geometry>
<cell id="1" material="1" name="fuel" region="1 -2 3 -4 5 -6" universe="1" />
<cell id="2" material="2" name="clad" region="(-1 | 2 | -3 | 4 | -5 | 6) (7 -8 9 -10 11 -12)" universe="1" />
<cell id="3" material="3" name="water" region="(-7 | 8 | -9 | 10 | -11 | 12) (13 -14 15 -16 17 -18)" universe="1" />
<surface coeffs="-5.0" id="1" name="minimum x" type="x-plane" />
<surface coeffs="5.0" id="2" name="maximum x" type="x-plane" />
<surface coeffs="-5.0" id="3" name="minimum y" type="y-plane" />
<surface coeffs="5.0" id="4" name="maximum y" type="y-plane" />
<surface coeffs="-5.0" id="5" name="minimum z" type="z-plane" />
<surface coeffs="5.0" id="6" name="maximum z" type="z-plane" />
<surface coeffs="-6.0" id="7" name="minimum x" type="x-plane" />
<surface coeffs="6.0" id="8" name="maximum x" type="x-plane" />
<surface coeffs="-6.0" id="9" name="minimum y" type="y-plane" />
<surface coeffs="6.0" id="10" name="maximum y" type="y-plane" />
<surface coeffs="-6.0" id="11" name="minimum z" type="z-plane" />
<surface coeffs="6.0" id="12" name="maximum z" type="z-plane" />
<surface boundary="vacuum" coeffs="-10" id="13" name="minimum x" type="x-plane" />
<surface boundary="vacuum" coeffs="10" id="14" name="maximum x" type="x-plane" />
<surface boundary="vacuum" coeffs="-10" id="15" name="minimum y" type="y-plane" />
<surface boundary="vacuum" coeffs="10" id="16" name="maximum y" type="y-plane" />
<surface boundary="vacuum" coeffs="-10" id="17" name="minimum z" type="z-plane" />
<surface boundary="vacuum" coeffs="10" id="18" name="maximum z" type="z-plane" />
</geometry>
<settings>
<run_mode>fixed source</run_mode>
<particles>100</particles>
<batches>10</batches>
<source strength="1.0">
<space type="point">
<parameters>0.0 0.0 0.0</parameters>
</space>
<angle reference_uvw="-1.0 0.0 0.0" type="monodirectional" />
<energy type="discrete">
<parameters>15000000.0 1.0</parameters>
</energy>
</source>
</settings>
<tallies>
<mesh id="1" library="moab" type="unstructured">
<filename>test_mesh_tets.h5m</filename>
</mesh>
<filter id="1" type="mesh">
<bins>1</bins>
</filter>
<tally id="1" name="unstructured mesh tally">
<filters>1</filters>
<scores>flux</scores>
<estimator>tracklength</estimator>
</tally>
</tallies>
</model>

View file

@ -162,8 +162,6 @@ def test_external_mesh(cpp_driver):
water_mat.set_density("atom/b-cm", 0.07416)
materials.append(water_mat)
materials.export_to_xml()
# Geometry
fuel_min_x = openmc.XPlane(-5.0, name="minimum x")
fuel_max_x = openmc.XPlane(5.0, name="maximum x")

View file

@ -1,65 +1,64 @@
<?xml version='1.0' encoding='utf-8'?>
<geometry>
<cell id="1" material="1" region="-1" universe="2" />
<cell id="2" material="2" region="1" universe="1" />
<cell fill="1" id="3" universe="2" />
<cell id="4" material="1" region="-2" universe="3" />
<cell id="5" material="2" region="2" universe="3" />
<cell fill="4" id="6" region="3 -4 5 -6" universe="5" />
<lattice id="4">
<pitch>2 2</pitch>
<dimension>4 4</dimension>
<lower_left>-4 -4</lower_left>
<universes>
<model>
<materials>
<material depletable="true" id="1">
<density units="g/cc" value="4.5" />
<nuclide ao="1.0" name="U235" />
</material>
<material id="2">
<density units="g/cc" value="1.0" />
<nuclide ao="1.0" name="H1" />
</material>
</materials>
<geometry>
<cell id="1" material="1" region="-1" universe="2" />
<cell id="2" material="2" region="1" universe="1" />
<cell fill="1" id="3" universe="2" />
<cell id="4" material="1" region="-2" universe="3" />
<cell id="5" material="2" region="2" universe="3" />
<cell fill="4" id="6" region="3 -4 5 -6" universe="5" />
<lattice id="4">
<pitch>2 2</pitch>
<dimension>4 4</dimension>
<lower_left>-4 -4</lower_left>
<universes>
2 3 3 3
3 2 3 3
3 3 2 3
3 3 3 2 </universes>
</lattice>
<surface coeffs="0.0 0.0 0.7" id="1" type="z-cylinder" />
<surface coeffs="0.0 0.0 0.5" id="2" type="z-cylinder" />
<surface boundary="reflective" coeffs="-4.0" id="3" name="minimum x" type="x-plane" />
<surface boundary="reflective" coeffs="4.0" id="4" name="maximum x" type="x-plane" />
<surface boundary="reflective" coeffs="-4.0" id="5" name="minimum y" type="y-plane" />
<surface boundary="reflective" coeffs="4.0" id="6" name="maximum y" type="y-plane" />
</geometry>
<?xml version='1.0' encoding='utf-8'?>
<materials>
<material depletable="true" id="1">
<density units="g/cc" value="4.5" />
<nuclide ao="1.0" name="U235" />
</material>
<material id="2">
<density units="g/cc" value="1.0" />
<nuclide ao="1.0" name="H1" />
</material>
</materials>
<?xml version='1.0' encoding='utf-8'?>
<settings>
<run_mode>eigenvalue</run_mode>
<particles>1000</particles>
<batches>5</batches>
<inactive>0</inactive>
<source strength="1.0">
<space type="point">
<parameters>0.0 0.0 0.0</parameters>
</space>
</source>
</settings>
<?xml version='1.0' encoding='utf-8'?>
<tallies>
<filter id="1" type="cellinstance">
<bins>4 0 4 1 4 2 4 3 4 4 4 5 4 6 4 7 4 8 4 9 4 10 4 11 2 0 2 1 2 2 2 3 3 0 3 1 3 2 3 3</bins>
</filter>
<filter id="2" type="cellinstance">
<bins>3 3 3 2 3 1 3 0 2 3 2 2 2 1 2 0 4 11 4 10 4 9 4 8 4 7 4 6 4 5 4 4 4 3 4 2 4 1 4 0</bins>
</filter>
<tally id="1">
<filters>1</filters>
<scores>total</scores>
</tally>
<tally id="2">
<filters>2</filters>
<scores>total</scores>
</tally>
</tallies>
</lattice>
<surface coeffs="0.0 0.0 0.7" id="1" type="z-cylinder" />
<surface coeffs="0.0 0.0 0.5" id="2" type="z-cylinder" />
<surface boundary="reflective" coeffs="-4.0" id="3" name="minimum x" type="x-plane" />
<surface boundary="reflective" coeffs="4.0" id="4" name="maximum x" type="x-plane" />
<surface boundary="reflective" coeffs="-4.0" id="5" name="minimum y" type="y-plane" />
<surface boundary="reflective" coeffs="4.0" id="6" name="maximum y" type="y-plane" />
</geometry>
<settings>
<run_mode>eigenvalue</run_mode>
<particles>1000</particles>
<batches>5</batches>
<inactive>0</inactive>
<source strength="1.0">
<space type="point">
<parameters>0.0 0.0 0.0</parameters>
</space>
</source>
</settings>
<tallies>
<filter id="1" type="cellinstance">
<bins>4 0 4 1 4 2 4 3 4 4 4 5 4 6 4 7 4 8 4 9 4 10 4 11 2 0 2 1 2 2 2 3 3 0 3 1 3 2 3 3</bins>
</filter>
<filter id="2" type="cellinstance">
<bins>3 3 3 2 3 1 3 0 2 3 2 2 2 1 2 0 4 11 4 10 4 9 4 8 4 7 4 6 4 5 4 4 4 3 4 2 4 1 4 0</bins>
</filter>
<tally id="1">
<filters>1</filters>
<scores>total</scores>
</tally>
<tally id="2">
<filters>2</filters>
<scores>total</scores>
</tally>
</tallies>
</model>

View file

@ -1,23 +0,0 @@
<?xml version='1.0' encoding='utf-8'?>
<geometry>
<cell fill="5" id="1" name="Cell 1" region="1 -2 3 -4" universe="0" />
<cell id="101" material="1" name="cell 2" region="-5" universe="1" />
<cell id="102" material="2" name="cell 3" region="5" universe="1" />
<cell id="500" material="2" name="cell 4" region="" universe="3" />
<hex_lattice id="5" n_rings="2">
<pitch>1.0</pitch>
<outer>3</outer>
<center>0.0 0.0</center>
<universes>
1
1 1
1
1 1
1</universes>
</hex_lattice>
<surface boundary="vacuum" coeffs="-3" id="1" name="left" type="x-plane" />
<surface boundary="vacuum" coeffs="3" id="2" name="right" type="x-plane" />
<surface boundary="vacuum" coeffs="-4" id="3" name="bottom" type="y-plane" />
<surface boundary="vacuum" coeffs="4" id="4" name="top" type="y-plane" />
<surface boundary="transmission" coeffs="0 0 0.4" id="5" type="z-cylinder" />
</geometry>

Some files were not shown because too many files have changed in this diff Show more