# OpenFOAM® v2006: New and improved post-processing

30/06/2020

## Improved data conversion to Ensight format

The foamToEnsight utility has been extended to include flexible handling of cellZones and to incorporate more functionality similar to foamToVTK. The foamToEnsightParts utility (which was serial only) is now redundant and hence removed.

Now, foamToEnsight

• can handle multiple cellZones
• additional support for point fields (as per foamToVTK)
• additional -nearCellValue option (as per foamToVTK)
• as before, can run in serial or in parallel

 Options Output default Individual parts for cellZones, unzoned cells (internalMesh) and patches -cellZones NAME/LIST Specify single or multiple cellZones to write -no-cellZones Suppress writing any cellZones -excludePatches NAME/LIST Exclude single or multiple patches (name or regex) from writing -index NUM Starting index for consecutive number of Ensight data/files. -nearCellValue Use zero-gradient cell values on patches -no-mesh Suppress writing the geometry -no-overwrite Suppress removal of existing EnSight output directory -no-point-data Suppress conversion of pointFields, disable -nodeValues

The full list of options can be found in the online manual and/or in the OpenFOAM API guide

The improved cellZones functionality can be tested on using tutorial case with cellZones. After running foamToEnsight, users can visualise the case as shown in the figure below, where the various cell zones are highlighted in different colors. In ParaView, cellZones can be extracted from the Ensight format via the filter Extract block.

Propeller case processed with Ensight (left) and ParaView (right)

Tutorial
Tutorial
Tutorial
Tutorial
Tutorial
Tutorial
Tutorial
$FOAM_TUTORIALS/incompressible/pisoFoam/laminar/cavity Extended code guide pow ## Improved controls for sampled surfaces The surface output formats have been extended to accept commonly used format and compression keywords. The exact meaning of these will depend upon the context. For VTK output, for example, this will choose between binary/ASCII formats, but compression will be silently ignored. For X3D output, the output remains ASCII, but the output file can be compressed. This change also adds support for binary output of boundaryData, for improved file sizes with mapped fields. The nastran and raw formats now support independent field scaling in a flexible dictionary format, as well as geometric scaling. For example, formatOptions { raw { compression on; scale 1000; // [m] -> [mm] fieldScale { "p.*" 0.01; // [Pa] -> [mbar] } } } Source code$FOAM_SRC/src/surfMesh/writers/nastran
\$FOAM_SRC/src/surfMesh/writers/raw