openmc.lib
– Python bindings to the C/C++ API¶
This module provides bindings to C/C++ functions defined by OpenMC shared
library. When the openmc.lib
package is imported, the OpenMC shared
library is automatically loaded. Calls to the OpenMC library can then be via
functions or objects in openmc.lib
, for example:
openmc.lib.init()
openmc.lib.run()
openmc.lib.finalize()
Functions¶
Run stochastic volume calculation |
|
Return the current batch of the simulation. |
|
Export physical properties. |
|
Export weight windows. |
|
Finalize simulation and free memory |
|
Find the cell at a given point |
|
Find the material at a given point |
|
Return an array of cell IDs for a DAGMC universe. |
|
Calculate a global bounding box for the model |
|
Mean and standard deviation of the mean for each global tally. |
|
Reset tallies, timers, and pseudo-random number generator state. |
|
Generate a 2-D map of cell and material IDs. |
|
Import physical properties. |
|
Import weight windows. |
|
Initialize OpenMC |
|
Return whether statepoint will be written in current batch or not. |
|
Iterator over batches. |
|
Return the calculated k-eigenvalue and its standard deviation. |
|
Load cross section data for a nuclide. |
|
Return whether processor is master processor or not. |
|
Run next batch. |
|
Number of realizations of global tallies. |
|
Plot geometry |
|
Generate a 2-D map of cell temperatures and material densities. |
|
Reset tally results |
|
Reset timers. |
|
Run simulation |
|
Provides context manager for calling OpenMC shared library functions. |
|
Sample external source and return source particles. |
|
Finalize simulation |
|
Initialize simulation |
|
Return source bank as NumPy array |
|
Load a statepoint file. |
|
Write a statepoint file. |
Classes¶
Cell stored internally. |
|
CylindricalMesh stored internally. |
|
Material stored internally. |
|
Base class to represent mesh objects |
|
Mesh filter stored internally. |
|
MeshBorn filter stored internally. |
|
MeshSurface filter stored internally. |
|
Nuclide stored internally. |
|
RectilinearMesh stored internally. |
|
RegularMesh stored internally. |
|
SphericalMesh stored internally. |
|
Tally stored internally. |
|
WeightWindows stored internally. |
|
Data¶
- openmc.lib.cells¶
Mapping of cell ID to
openmc.lib.Cell
instances.- Type
- openmc.lib.filters¶
Mapping of filter ID to
openmc.lib.Filter
instances.- Type
- openmc.lib.materials¶
Mapping of material ID to
openmc.lib.Material
instances.- Type
- openmc.lib.meshes¶
Mapping of mesh ID to
openmc.lib.Mesh
instances.- Type
- openmc.lib.nuclides¶
Mapping of nuclide name to
openmc.lib.Nuclide
instances.- Type
- openmc.lib.tallies¶
Mapping of tally ID to
openmc.lib.Tally
instances.- Type
- openmc.lib.weight_windows¶
Mapping of weight window ID to
openmc.lib.WeightWindows
instances.- Type