A Python package for converting OpenMC mesh tallies to VTK files and optionally converting the units
Project description
Convert an OpenMC mesh tally to a VTK file with optional unit conversion
Installation
pip install openmc-mesh-tally-to-vtk
Python API Usage
The package can be used in conjunction with OpenMC to produce a VTK file of a openmc.RegularMesh
tally.
The simplest example is to read in an OpenMC tally and write it out as a VTK file.
from openmc_mesh_tally_to_vtk import write_mesh_tally_to_vtk
import openmc
# assumes you have a statepoint file from the OpenMC simulation
statepoint = openmc.StatePoint('statepoint.3.h5')
# assumes the statepoint file has a RegularMesh tally with a certain name
my_tally = statepoint.get_tally(name='tally_on_regular_mesh')
# converts the tally result into a VTK file
write_mesh_tally_to_vtk(
tally=my_tally,
filename = "vtk_file_from_openmc_mesh.vtk",
)
Acknowledge
This package is based on a GitHub Gist by by Patrick Shriwise
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for openmc_mesh_tally_to_vtk-0.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5066b4aa621399e6893f0894c7d87a1fcf26d6a752b1523e16b61a5df005859 |
|
MD5 | 926be5b7df67630628f8233c19d1d85b |
|
BLAKE2b-256 | 98f229b8ab1df1f83ebd088f571db7d2df16df5f09463cc2fb34d2f1a6b6684d |
Close
Hashes for openmc_mesh_tally_to_vtk-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a0db72bee54b9ff7680bb4f70e4209e5ebcfe2f02764fe06c3708fe30c83d23 |
|
MD5 | 5a60d2d7ab6a7c96c45a3c152196e894 |
|
BLAKE2b-256 | 138dcbc5718f4b30f979be8c480a34df57b1d5b7a099c60f99794f61ce9384ef |