# Extracting Data from CFF Fluent Files to CSV File

**URL:** https://discourse.vtk.org/t/extracting-data-from-cff-fluent-files-to-csv-file/12737
**Category:** Support
**Tags:** python, code, file-formats
**Created:** [November 17, 2023, 1:56pm UTC](https://discourse.vtk.org/t/extracting-data-from-cff-fluent-files-to-csv-file/12737 "2023-11-17T13:56:12Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![hoehnp](https://discourse.vtk.org/user_avatar/discourse.vtk.org/hoehnp/32/8025_2.png) [@hoehnp](https://discourse.vtk.org/u/hoehnp)
#### Post date: [November 17, 2023, 1:56pm UTC](https://discourse.vtk.org/t/extracting-data-from-cff-fluent-files-to-csv-file/12737/1 "2023-11-17T13:56:12Z")

</div>

Hi,  
for quick sanity checks of simulation results from Fluent I would like to generate an Image of the 3d data cut a long a predefined plane. Since the vtkFLUENTCFFReader is very new I did only find the test cases given in the gitlab repository ( [TestFLUENTCFFReader\_3D.py](https://gitlab.kitware.com/vtk/vtk/-/blob/master/IO/FLUENTCFF/Testing/Python/TestFLUENTCFFReader_3D.py?ref_type=heads) and [TestFLUENTCFFReader.py](https://gitlab.kitware.com/vtk/vtk/-/blob/master/IO/FLUENTCFF/Testing/Python/TestFLUENTCFFReader.py?ref_type=heads)) . However, since they rely on the rendering capabilities of VTK, it is required to have a X-Server running on the machine. As this is not always the case for HPC-clusters, my desired approach would be to extract the data and store it in a numpy-array or CSV-File for the last time step. Generally, I would like to use the approach given in another [discourse discussion](https://discourse.vtk.org/t/save-polydata-to-csv-using-vtkdelimitedtextwriter/986/4). What is the proper way to extract the data from the vtkMultiBlockDataSet given as output of the Reader?  
Any suggestions are very appreciated.

---

<div class="post-metadata">

### Author: ![hoehnp](https://discourse.vtk.org/user_avatar/discourse.vtk.org/hoehnp/32/8025_2.png) [@hoehnp](https://discourse.vtk.org/u/hoehnp)
#### Post date: [November 17, 2023, 10:16pm UTC](https://discourse.vtk.org/t/extracting-data-from-cff-fluent-files-to-csv-file/12737/2 "2023-11-17T22:16:55Z")

</div>

I actually found a solution for my problem by myself. One can extract blocks from a vtkMultiBlockDataSet using the GetBlock() function. The modifying and plotting is inspired by the gist of [mrklein](https://gist.github.com/mrklein/dc19fbac73564dabdba2). My complete code can be found in a git by [me](https://gist.github.com/hoehnp/17d912913e49f6bf1e2a1c5fb516ed49).
