OpenFoam 5.x Particle data cannot be read in ParaView
This issue arises because the most recent OpenFoam installation (5.x) changed the way particle Lagrangian data is handled: https://cfd.direct/openfoam/free-software/barycentric-tracking/
Previously, the position data was written as 3 scalars followed by a cellID. Currently, the data is written as 4 scalars followed by a cellID, which causes an error message in ParaView that reads:
Expected punctuation token ')', found []
Notable references/previous issues include: #17038 (closed), #16833 (closed), and https://bugs.openfoam.org/view.php?id=2196
I tried outputting in both binary and ascii and the error persists. I also installed Paraview 5.1.2, 5.5.0, and 5.5.2 to check if the error is in recent ParaView releases, but it did not go away. My current workaround is running foamToVTK
after every simulation, which converts the data into VTK format, and post-processing, but it is time consuming. I would like to use the default paraFoam
function with the native ParaView reader right away.
Steps to reproduce: 1- Go to $FOAM_Tutorials\lagrangian\sprayFoam\aachenBomb in the latest OpenFoam Release (5.x) 2- Run using sprayFoam for at least one time step (5e-005) 3- Post-process using paraFoam 4- Error pops up after clicking Apply in ParaView 5.4.1