Python-Interface for reading VTU files and exactracting time series data from PVD/VTU files
VTUinterface is a python package for easy accessing VTU/PVD files as outputed by Finite Element software like OpenGeoSys. It uses the VTK python wrapper and linear interpolation between time steps and grid points to access any points in space and time within the simulation domain.
VTUinterface together with ogs6py can be viewed in action here:
Note: VTUinterface requires the vtk wrapper for python. Alternatively, a version based on MESHIO is also under development.
clone the repository and use pip to install the package
# pip install [--user] https://github.com/joergbuchwald/VTUinterface/archive/refs/heads/master.zip
You can find the documentation under https://joergbuchwald.github.io/VTUinterface-doc/
Although, a python package, VTUinterface is tested to work through PyCall under julia as well:
Unittests can be run via
# python tests/test_vtuinterface.py
from the project root directory.
Installation:
As the input data is triangulated with QHull for the linear interpolation it might fail at boundaries or if a wrong input dimension is given.
Possible solutions:
dim
keyword) of the problem is crucial.dim
keyword specifies also the coordinates to use, VTUinterface assumes that dim=1
refers to the x coordinate and dim=2
implies that the problem lies in the xy-plane by default. This can be changed by specifying one_d_axis
for one dimension or two_d_planenormal
for two dimensions.nneighbors
keyword. Default value is 20.interpolation_backend
from scipy to vtk and try out different interpolation kernels.