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",
)
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.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1133bcf998a80957f194a776c853a1e428ca64427a22f0dd7bbee5b102124663 |
|
MD5 | 0219725193a162a9da77120f756f8d9c |
|
BLAKE2b-256 | df4599e4fdb677457470c3d3e241aa3002269c25390662529ea6687f0ad6067b |
Close
Hashes for openmc_mesh_tally_to_vtk-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 69f333ddc2722546a5dce0af9e0a99b00dd1b6f1b9bc9eb976a4d40cd7e744b1 |
|
MD5 | d21908696b45eec25d9527289285a54e |
|
BLAKE2b-256 | 9131db9d7f94a1c3e4feefab763699ad4cd508c2d060a65a0050c4b68f4cd634 |