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 which can then be opened with programs like Paraview.
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
Metadata
Release files for openmc-mesh-tally-to-vtk 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| openmc_mesh_tally_to_vtk-0.2.1.tar.gz | 4.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| openmc_mesh_tally_to_vtk-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.9 kB
Release files / openmc_mesh_tally_to_vtk-0.2.1.tar.gz
| Download URL | openmc_mesh_tally_to_vtk-0.2.1.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e3d74ec1d0d227efc9921a930622d3010023e2cdb35e77ce09553c9a44152273
|
|
BLAKE2b-256 checksum How to use checksums |
09c7b6ef592b99afdf4c775a2d51427c78d40e50a0718bd1c58f812b00389d8e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
|
Release files / openmc_mesh_tally_to_vtk-0.2.1-py3-none-any.whl
| Download URL | openmc_mesh_tally_to_vtk-0.2.1-py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4fc9c8afddbb781a020e443382f3406ed0145a04d03d8d1c3cd1cb30ceaefb75
|
|
BLAKE2b-256 checksum How to use checksums |
40ec096a770efca5df2a518ae4b8f918e1a3c2b7eb70948ff0c00d4472f8a4c4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
|