openmc – Basic Functionality

Handling nuclear data

openmc.XSdata

A multi-group cross section data set providing all the multi-group data necessary for a multi-group OpenMC calculation.

openmc.MGXSLibrary

Multi-Group Cross Sections file used for an OpenMC simulation.

Simulation Settings

openmc.SourceBase

Base class for external sources

openmc.IndependentSource

Distribution of phase space coordinates for source sites.

openmc.FileSource

A source based on particles stored in a file

openmc.CompiledSource

A source based on a compiled shared library

openmc.MeshSource

A source with a spatial distribution over mesh elements

openmc.SourceParticle

Source particle

openmc.VolumeCalculation

Stochastic volume calculation specifications and results.

openmc.Settings

Settings used for an OpenMC simulation.

openmc.read_source_file

Read a source file and return a list of source particles.

openmc.write_source_file

Write a source file using a collection of source particles

openmc.wwinp_to_wws

Create WeightWindows instances from a wwinp file

Material Specification

openmc.Material

A material composed of a collection of nuclides/elements.

openmc.Materials

Collection of Materials used for an OpenMC simulation.

Cross sections for nuclides, elements, and materials can be plotted using the following function:

openmc.plot_xs

Creates a figure of continuous-energy cross sections for this item.

Building geometry

openmc.Plane

An arbitrary plane of the form \(Ax + By + Cz = D\).

openmc.XPlane

A plane perpendicular to the x axis of the form \(x - x_0 = 0\)

openmc.YPlane

A plane perpendicular to the y axis of the form \(y - y_0 = 0\)

openmc.ZPlane

A plane perpendicular to the z axis of the form \(z - z_0 = 0\)

openmc.XCylinder

An infinite cylinder whose length is parallel to the x-axis of the form \((y - y_0)^2 + (z - z_0)^2 = r^2\).

openmc.YCylinder

An infinite cylinder whose length is parallel to the y-axis of the form \((x - x_0)^2 + (z - z_0)^2 = r^2\).

openmc.ZCylinder

An infinite cylinder whose length is parallel to the z-axis of the form \((x - x_0)^2 + (y - y_0)^2 = r^2\).

openmc.Sphere

A sphere of the form \((x - x_0)^2 + (y - y_0)^2 + (z - z_0)^2 = r^2\).

openmc.Cone

A conical surface parallel to the x-, y-, or z-axis.

openmc.XCone

A cone parallel to the x-axis of the form \((y - y_0)^2 + (z - z_0)^2 = r^2 (x - x_0)^2\).

openmc.YCone

A cone parallel to the y-axis of the form \((x - x_0)^2 + (z - z_0)^2 = r^2 (y - y_0)^2\).

openmc.ZCone

A cone parallel to the z-axis of the form \((x - x_0)^2 + (y - y_0)^2 = r^2 (z - z_0)^2\).

openmc.Quadric

A surface of the form \(Ax^2 + By^2 + Cz^2 + Dxy + Eyz + Fxz + Gx + Hy + Jz + K = 0\).

openmc.XTorus

A torus of the form \((x - x_0)^2/B^2 + (\sqrt{(y - y_0)^2 + (z - z_0)^2} - A)^2/C^2 - 1 = 0\).

openmc.YTorus

A torus of the form \((y - y_0)^2/B^2 + (\sqrt{(x - x_0)^2 + (z - z_0)^2} - A)^2/C^2 - 1 = 0\).

openmc.ZTorus

A torus of the form \((z - z_0)^2/B^2 + (\sqrt{(x - x_0)^2 + (y - y_0)^2} - A)^2/C^2 - 1 = 0\).

openmc.Halfspace

A positive or negative half-space region.

openmc.Intersection

Intersection of two or more regions.

openmc.Union

Union of two or more regions.

openmc.Complement

Complement of a region.

openmc.BoundingBox

Axis-aligned bounding box.

openmc.Cell

A region of space defined as the intersection of half-space created by quadric surfaces.

openmc.Universe

A collection of cells that can be repeated.

openmc.DAGMCUniverse

A reference to a DAGMC file to be used in the model.

openmc.RectLattice

A lattice consisting of rectangular prisms.

openmc.HexLattice

A lattice consisting of hexagonal prisms.

openmc.Geometry

Geometry representing a collection of surfaces, cells, and universes.

Many of the above classes are derived from several abstract classes:

openmc.Surface

An implicit surface with an associated boundary condition.

openmc.Region

Region of space that can be assigned to a cell.

openmc.Lattice

A repeating structure wherein each element is a universe.

Constructing Tallies

openmc.Filter

Tally modifier that describes phase-space and other characteristics.

openmc.UniverseFilter

Bins tally event locations based on the Universe they occurred in.

openmc.MaterialFilter

Bins tally event locations based on the Material they occurred in.

openmc.MaterialFromFilter

Bins tally event locations based on the Material they occurred in.

openmc.CellFilter

Bins tally event locations based on the Cell they occurred in.

openmc.CellFromFilter

Bins tally on which cell the particle came from.

openmc.CellBornFilter

Bins tally events based on which cell the particle was born in.

openmc.CellInstanceFilter

Bins tally events based on which cell instance a particle is in.

openmc.CollisionFilter

Bins tally events based on the number of collisions.

openmc.SurfaceFilter

Filters particles by surface crossing

openmc.MeshFilter

Bins tally event locations by mesh elements.

openmc.MeshSurfaceFilter

Filter events by surface crossings on a mesh.

openmc.EnergyFilter

Bins tally events based on incident particle energy.

openmc.EnergyoutFilter

Bins tally events based on outgoing particle energy.

openmc.MuFilter

Bins tally events based on particle scattering angle.

openmc.PolarFilter

Bins tally events based on the incident particle's direction.

openmc.AzimuthalFilter

Bins tally events based on the incident particle's direction.

openmc.DistribcellFilter

Bins tally event locations on instances of repeated cells.

openmc.DelayedGroupFilter

Bins fission events based on the produced neutron precursor groups.

openmc.EnergyFunctionFilter

Multiplies tally scores by an arbitrary function of incident energy.

openmc.LegendreFilter

Score Legendre expansion moments up to specified order.

openmc.SpatialLegendreFilter

Score Legendre expansion moments in space up to specified order.

openmc.SphericalHarmonicsFilter

Score spherical harmonic expansion moments up to specified order.

openmc.TimeFilter

Bins tally events based on the particle's time.

openmc.ZernikeFilter

Score Zernike expansion moments in space up to specified order.

openmc.ZernikeRadialFilter

Score the \(m = 0\) (radial variation only) Zernike moments up to specified order.

openmc.ParticleFilter

Bins tally events based on the Particle type.

openmc.RegularMesh

A regular Cartesian mesh in one, two, or three dimensions

openmc.RectilinearMesh

A 3D rectilinear Cartesian mesh

openmc.CylindricalMesh

A 3D cylindrical mesh

openmc.SphericalMesh

A 3D spherical mesh

openmc.UnstructuredMesh

A 3D unstructured mesh

openmc.Trigger

A criterion for when to finish a simulation based on tally uncertainties.

openmc.TallyDerivative

A material perturbation derivative to apply to a tally.

openmc.Tally

A tally defined by a set of scores that are accumulated for a list of nuclides given a set of filters.

openmc.Tallies

Collection of Tallies used for an OpenMC simulation.

Geometry Plotting

openmc.Plot

Definition of a finite region of space to be plotted.

openmc.ProjectionPlot

Definition of a camera's view of OpenMC geometry

openmc.Plots

Collection of Plots used for an OpenMC simulation.

Running OpenMC

openmc.run

Run an OpenMC simulation.

openmc.calculate_volumes

Run stochastic volume calculations in OpenMC.

openmc.plot_geometry

Run OpenMC in plotting mode

openmc.plot_inline

Display plots inline in a Jupyter notebook.

openmc.search_for_keff

Function to perform a keff search by modifying a model parametrized by a single independent variable.

Post-processing

openmc.Particle

Information used to restart a specific particle that caused a simulation to fail.

openmc.ParticleTrack

Particle track information

openmc.StatePoint

State information on a simulation at a certain point in time (at the end of a given batch).

openmc.Summary

Summary of model used in a simulation.

openmc.Track

Tracks resulting from a single source particle

openmc.Tracks

Collection of particle tracks

openmc.voxel_to_vtk

Converts a voxel HDF5 file to a VTK file

The following classes and functions are used for functional expansion reconstruction.

openmc.ZernikeRadial

Create radial only Zernike polynomials given coefficients and domain.

openmc.legendre_from_expcoef

Return a Legendre series object based on expansion coefficients.

Various classes may be created when performing tally slicing and/or arithmetic:

openmc.arithmetic.CrossScore

A special-purpose tally score used to encapsulate all combinations of two tally's scores as an outer product for tally arithmetic.

openmc.arithmetic.CrossNuclide

A special-purpose nuclide used to encapsulate all combinations of two tally's nuclides as an outer product for tally arithmetic.

openmc.arithmetic.CrossFilter

A special-purpose filter used to encapsulate all combinations of two tally's filter bins as an outer product for tally arithmetic.

openmc.arithmetic.AggregateScore

A special-purpose tally score used to encapsulate an aggregate of a subset or all of tally's scores for tally aggregation.

openmc.arithmetic.AggregateNuclide

A special-purpose tally nuclide used to encapsulate an aggregate of a subset or all of tally's nuclides for tally aggregation.

openmc.arithmetic.AggregateFilter

A special-purpose tally filter used to encapsulate an aggregate of a subset or all of a tally filter's bins for tally aggregation.

Variance Reduction

openmc.WeightWindows

Mesh-based weight windows

openmc.WeightWindowGenerator

Class passed to setting to govern weight window generation using the OpenMC executable

openmc.hdf5_to_wws

Create WeightWindows instances from a weight windows HDF5 file

Coarse Mesh Finite Difference Acceleration

CMFD is implemented in OpenMC and allows users to accelerate fission source convergence during inactive neutron batches. To use CMFD, the openmc.cmfd.CMFDRun class executes OpenMC through the C API, solving the CMFD system between fission generations and modifying the source weights. Note that the openmc.cmfd module is not imported by default with the openmc namespace and needs to be imported explicitly.

openmc.cmfd.CMFDMesh

A structured Cartesian mesh used for CMFD acceleration.

openmc.cmfd.CMFDRun

Class for running CMFD acceleration through the C API.

At the minimum, a CMFD mesh needs to be specified in order to run CMFD. Once the mesh and other optional properties are set, a simulation can be run with CMFD turned on using openmc.cmfd.CMFDRun.run().