I am Suman Vajjala and I am developing a parallel, high order, unstructured grid based CFD code in C++ for LES/DNS. As I will be using high order mesh elements, I decided to use Paraview as my main visualization software.
I’m new to the VTK API and I tried to find resources/articles on how to use them but I could not find any. I have, infact, written a VTK writer for my CFD code as a result. Could you please direct me to an example where the VTK library is used for writing CFD data using the VTK API? I plan to replace my code with it.
I suggest finding the examples that create unstructured meshes from scratch as well as ones that use writers. Having said that, there is not a writer for every format VTK supports. For example, there is not writer for the VTKHDF5 format. The assumption there is that the simulation would write VTKHDF5 directly using the HDF5 API.
You could also consider to write your solution in CGNS format, which is much more common than the VTK format. In fact, the VTK file documentation itself rightly suggests to use something else, unless… (cite from VTK File Formats - VTK documentation: “Whenever possible, we recommend that you use formats that are more widely used.”). We use CGNS as output (and input, by the way) and find that it works well with Paraview, as well as with other postprocessing tools. Benefit is also that you can easily exchange the files with other parties.