How to Export Simcenter Flotherm Results to Paraview

2024-12-04T19:31:55.000-0500

Summary

A Python script is used to convert Simcenter Flotherm simulation results to Paraview (VTK) format for further post processing


Details

Why Paraview?

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.  

waterBlock.png

Python Script Prerequisites

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. 

2024-12-03 12_44_53-fltVTK – fltVTK.py.png

 

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.

 

2024-12-03 12_45_24-fltVTK – fltVTK.py.png

One additional variable, cellobject, is always extracted.  Fluid cells are assigned a value of zero, and solid geometry is assigned values based on regions.  

 

2024-12-03 13_38_58-ParaView 5.12.0.png

Converting Simcenter Flotherm Results

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.

 

Clipboard_12-03-2024_01.png

The script first converts the Simcenter Flotherm mesh definition:

 

2024-12-03 13_52_36-Clipboard_12-03-2024_02 - IrfanView.png

The results are extracted and converted to ASCII format using a utility that is installed with Simcenter Flotherm:

 

2024-12-03 13_55_06-D__TME_Communities_VTK_2024-12-03 13_52_36-Clipboard_12-03-2024_02 - IrfanView.p.png

The results are then mapped to VTK format and written to file(s):

 

2024-12-03 13_57_50-How To Monitor Solution Progress for Simcenter Flotherm Batch Solving _ Knowledg.png

To download the Python script make sure you are logged in.  If there is any feedback please leave a comment.

 

 

KB Article ID# KB000155914_EN_US

Contents

SummaryDetails

Associated Components