OpenFOAM® v1706: New and improved post-processing
ParaView and VTK improvements
This release contains several important improvements for post-processing using ParaView and VTK components.
- The ParaView reader modules have been rewritten to support the newest ParaView versions, able to use any ParaView-5.x version. This allows us to progress and benefit from future updates to ParaView/VTK. The reader modules are now versioned, allowing them to build against different ParaView versions without incurring library load errors.
- In addition to reworking the GUI code, the reader module has been updated to enable internal caching of the VTK geometries. This improves speed whilst simultaneously reducing the memory overhead. Significant benefits should be seen for cases where the topology is fixed, or only includes point motion.
- This version of OpenFOAM also ships with the latest ParaView release (5.4.0), which includes several bug fixes and improvements contributed by OpenCFD to the ParaView/VTK code-base. The native OpenFOAM reader in VTK now supports 32/64-bit scalars/labels, adds skip zero-directory functionality and gracefully ignores OpenFOAM code blocks e.g., for coded boundary conditions.
- Consolidation of OpenFOAM to VTK conversion code into reusable library components has eliminated significant code duplication and improved flexibility. This has enabled the creation of the new vtkWrite function object that offers similar functionality to the foamToVTK utility.
- The foamToVTK utility and the new vtkWrite function object now
support the more modern ASCII and Base64-encoded VTK XML
formats. The XML append format is not currently supported for
reasons of code maintenance/integration.
The VTK xml format has better import control in ParaView and can be referenced to create multiblock .vtm datasets.
Curle acoustic analogy
The new Curle function object computes the acoustic pressure based on Curle’s acoustic analogy.
The output is a new volume field, Curle, which is stored on the mesh database for further post-processing, e.g. for surface plots and point sampling. An example of the required input is shown below:
Predicted Curle acoustic pressure for a cylinder source
- Source code
Updated particle tracking for wall-bounded streamlines
The wall-bounded streamline algorithm has been rewritten to enable tracking along (faces of) inverted cells. These cells are readily created by many meshing tools, e.g.snappyHexMesh, when attempting to conform to complex surfaces. The following image shows a square mesh where a single cell has been inverted:
Tracking (red line) along inverted cells
Starting from the left, the red pathline demonstrates tracking through the inverted boundary face. In combination with the zeroGradient function object to obtain the tracking velocity, this provides a more robust solution for obtaining streaklines.
- Source code
Improved time controls for function objects
In earlier versions, function objects that received time input required the time to be entered in seconds, and subsequently output in seconds. When running with e.g.engineTime, the user would need to convert to and from CA degrees to seconds to perform post-processing.
Time controls have now been updated to use the local time base, e.g. for the kivaTest test case, function objects can be triggered to commence after a given CA degrees, and the output time also written in CA degrees.
// Time in CA deg
# Time field min location(min) max
-90 p 1.882947e+05 (6.033640e-03 4.344814e-02 9.705185e-02) ...
-89.75 p 1.890711e+05 (2.988470e-02 -3.440271e-02 8.819962e-02) ...
-89.5 p 1.898581e+05 (2.988470e-02 -3.440271e-028.819962e-02) ...
-89.25 p 1.906456e+05 (-3.256830e-02 3.230491e-02 6.025885e-02) ...
-89 p 1.914488e+05 (2.970281e-03 4.366569e-02 9.674191e-02) ...
Updated noise utility
The noise utility has received multiple usability updates, including:
- processor directories no longer required for parallel operation
- input data validation
- select which data to write to file