TransWikia.com

Reading VTK file into C++ for analysis

Computational Science Asked on November 19, 2021

I apologize in advance if this post is at all ignorant or elementary, I am a pure mathematician who is newly getting into the world of scientific computing.

For my research, my advisor would like me to analyze a few 3d numerical simulations in C++ all of which are in a VTK format. To be more specific, we are modeling fluid mixing and I am interested in obtaining data regarding the maximum height and width of certain fluid structures. I have been given separate VTK files, each detonating a separate parameter such as x velocity, y velocity, z velocity, pressure, and density.

Does anyone have any suggestions on how to get started with this? At the moment I am at a loss as to where to even begin.

Regards.

One Answer

You can use VTK-m to parse the files and they will automatically show up in a sensible data structure, ready for parallel processing. The learning curve is a bit steep, but the documentation is very legible. Here's a demo which reads a VTK file and uses it for particle advection.

Answered by user14717 on November 19, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP