TenGun™ OpenFOAM Support
Last Updated May 29, 2025.
OpenFOAM® is a popular toolkit for Computational Fluid Dynamics (CFD) analysis. As of this writing it is at Version 12.
OpenFOAM is popular because it is quite comprehensive, and it is free and open source. On the other hand, it is also very different to use,
and in the author's opinion is extremely lacking in up-to-date, detailed documentation.
We added features to TenGun 3.0 to make it easier to use OpenFOAM as described in this document.
Time Series Mode (Postprocessing)
OpenFOAM results are typically viewed with the ParaFoam viewer suppied with OpenFOAM, and ParaFoam is a derivative of ParaView®.
We are not particularly fond of either of those viewers because they overly generalized, and it is much too difficult to
navigiate through the huge number of options.
To display OpenFOAM results using TenGun:
- After analysis, run the provided foamToVTK tool to convert the output to something more portable that we can read.
- Open your time series file(s) with TenGun.
- Display the time series using the normal, easy-to-use TenGun features, filtering by variable ("field") (U, P, etc.) as desired.
- Create movies, charts, and so on as desired.
We added one feature to TenGun specifically to handle OpenFOAM output. Namely, some variables are not available in the initial conditions output,
but then suddenly appear in the first time step output. Now, when TenGun discovers a new variable back fits it into data that
has already been loaded.
Assembly Mode (Preprocessing)
A number of features were added that can be used for OpenFOAM analysis and probably other similar cases as listed below.
- TenGun's original purpose was for SPH analysis, so 3D objects created in Assembly Mode were expected
to have walls with some thickness. OpenFOAM, on the other hand, largely uses the Finite Volume Method, which
in many cases expresses boundaries as walls with no thickness. You can now easily create such thin-wall objects.
-
OpenFOAM has the unfortunate practice of using a non-standard STL file format where they attach "patch" (surface) names.
We do not wish to further promote practice, so instead we (1) made it easier to split out objects from an STL file, and
(2) allow you to assign names to sub-objects in industry-standard STEP files.
-
Created two "export templates" called OpenFOAM12.export for single region and OpenFOAM12_MultiRegion for multi-region analysis.
These two templates allow you to edit part (patch) properties, and then export the entire model. This export process
greatly simplifies the creation of an OpenFOAM "case". Frequent OpenFOAM users can also easily clone and customize the templates.
- Enhanced the export template and "Edit Parts" logic to reload settings from a previous session, and allow you to reset
settings to defaults.
to defaults.
- Added specific export logic to deal with OpenFOAM case setup for various common usage patterns.
Status
This is an ongoing project, and we are looking for realistic analysis challenges to work on.
If you'd like more information or are interested in collaborting on this, please
Contact Us.