A Python script is used to convert Simcenter Flotherm simulation results to Paraview (VTK) format for further post processing
Attachments: | fltVTK_2405.zip (7 KB) |
Simcenter Flotherm provides multiple options for exporting tabular and graphical results but there are benefits to importing results into Paraview, the open-source, multi-platform data analysis and visualization application. Paraview provides extensive filters for processing results and supports file exports compatible with many rendering software tools. This article describes the usage of the provided Python script which converts Simcenter Flotherm results to Paraview (VTK) format.
There are two modules (packages) that need to be installed that are not included in most standard Python installations. The first is Numpy, which is used for array manipulation. The second is pyevtk, and allows ASCII data conversion to binary VTK format.
There are two settings within the script that need attention prior to running script.
The floInstallDir variable must be set to the Simcenter Flotherm installation folder. The second option, isVerbose, controls which results are written to the VTK file(s). If isVerbose is set to False only pressure, temperature, and velocity components are extracted.
One additional variable, cellobject, is always extracted. Fluid cells are assigned a value of zero, and solid geometry is assigned values based on regions.
The Python script is executed at a Command Prompt or from a Windows PowerShell and has two required inputs. The first input is the path to the Simcenter Flotherm model, and the second input is the path to the output folder.
The script first converts the Simcenter Flotherm mesh definition:
The results are extracted and converted to ASCII format using a utility that is installed with Simcenter Flotherm:
The results are then mapped to VTK format and written to file(s):
To download the Python script make sure you are logged in. If there is any feedback please leave a comment.