timofeymukha / turbulucid

A Python package for visualising 2D CFD datasets.
https://timofeymukha.github.io/turbulucid/
GNU General Public License v3.0
56 stars 27 forks source link

How to directly plot an hdf5 file directly #2

Closed minhbau closed 4 years ago

minhbau commented 4 years ago

Dear turbulucid Developers,

I wonder how to plot an hdf5 file containing several variables, each variable has 2-D uniform-grid data? i.e., How to plot Temperature variable with a dimension of 1280x1280 grids in my hdf5 using turbulucid without have to convert it to vtk? By using h5py, I can read my data, get T NumPy array of 1280x1280. How can I pass this array to Case object? It seems that Case object only created if reading from vtk-type data.

Thank you, Minh Bau.

timofeymukha commented 4 years ago

Hi Minh Bau, @minhbau

Sorry for the late response. You are right, turbulucid currently only reads in vtk data. If you have data on a uniform 2d grid, how about just using pyplot pcolormesh? https://matplotlib.org/3.2.1/api/_as_gen/matplotlib.pyplot.pcolormesh.html

Regards, Timofey

timofeymukha commented 4 years ago

@minhbau Can we close the issue, or would you like more input from my side?

timofeymukha commented 4 years ago

Closing due to inactivity. Feel free to open a new issue and ref this one if you need more help!