fusion-energy / openmc-dagmc-wrapper

A Python package that extends OpenMC base classes to provide convenience features and standardized tallies when simulating DAGMC geometry with OpenMC.
https://openmc-dagmc-wrapper.readthedocs.io/
MIT License
7 stars 2 forks source link

mesh slicing script for vis #40

Open shimwell opened 2 years ago

shimwell commented 2 years ago

To get the mesh tally results it would be useful to have a script that can load a vtk and take slices

DAGMC viz could be a solution but I believe this is python 2 and Visit code.

Perhaps a solution based on the well supported vtk python package would be ideal. vtk is already in the dependency stack and has examples here https://kitware.github.io/vtk-examples/site/Python/

shimwell commented 2 years ago

This script might be useful as well, it reads a h5 file and outputs vtk https://gist.github.com/pshriwise/da30da3daf08594dddf1a58b9f10dcc8

shimwell commented 2 years ago

this one might also be useful, it reads vtk files https://kitware.github.io/vtk-examples/site/Python/IO/ReadUnstructuredGrid/